I know there is a way to effectively shutdown your system based on a condition.
Please refresh my memory on how to do this ?
Example: I reached my stop loss for the day and want my automated system to shutdown and no longer execute.
Cancel a signal, prevent from executing
- rrams
- Posts: 129
- Joined: 10 Feb 2011
- Location: USA
- Has thanked: 7 times
- Been thanked: 70 times
- Contact:
Re: Cancel a signal, prevent from executing
hi syswiz,
If your signal is running in Portfolio Trader; you can create a Portfolio Money Management script to disable trading of all signals in the portfolio using the pmms_strategies_pause_all keyword or just stop taking new entries with pmms_strategies_deny_entries_all.
If your signal is running in a chart window or PT; you can prevent that one signal from executing by writing an Abort keyword into the signal code when your stop loss condition is met. This will change the status of the signal to off until you manually change it back. RaiseRunTimeError will do the same except also pop up a message box.
If your signal is running in a chart window and you want to disable trading but still run the signal to see where the trades would have occurred; you can issue a "CommandLine(".at_toggle");" to change the autotrading status, but this has to be done carefully to avoid double toggling the AT button on signal init.
If your signal is running in Portfolio Trader; you can create a Portfolio Money Management script to disable trading of all signals in the portfolio using the pmms_strategies_pause_all keyword or just stop taking new entries with pmms_strategies_deny_entries_all.
If your signal is running in a chart window or PT; you can prevent that one signal from executing by writing an Abort keyword into the signal code when your stop loss condition is met. This will change the status of the signal to off until you manually change it back. RaiseRunTimeError will do the same except also pop up a message box.
If your signal is running in a chart window and you want to disable trading but still run the signal to see where the trades would have occurred; you can issue a "CommandLine(".at_toggle");" to change the autotrading status, but this has to be done carefully to avoid double toggling the AT button on signal init.