Hi all,
Wondering if there is a way to abort a study without the run-time error.
Basically I want my study to run once then toggle off without the annoying pop-up and sound.
I am aware of the abort keyword (execution control) and have investigated command-line also but can't find a solution.
Thanks,
Abort a study without a run-time error [SOLVED]
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Abort a study without a run-time error
I'm reasonably sure this can work with the return keyword (untested though):Wondering if there is a way to abort a study without the run-time error.
Basically I want my study to run once then toggle off without the annoying pop-up and sound.
I am aware of the abort keyword (execution control) and have investigated command-line also but can't find a solution.
Code: Select all
Variables:
alreadyCalculated(False);
if (alreadyCalculated = true) then
#return;
// Any statements below `return` are not executed,
// so as soon as this Boolean variable is true,
// the indicator is not 'calculated' anymore.
// Put the code that you want to run once below the `return` reserved word, for example:
once (BarStatus(1) = 2) begin
// This code will be executed once on the
// close of the first bar
alreadyCalculcated = true;
end;
Re: Abort a study without a run-time error [SOLVED]
Thanks,
Its works in stopping the calculation but the study remain 'on' in the status line.. Was looking for the same effect as abort where the study becomes toggled off..
Its no big deal anyway
Its works in stopping the calculation but the study remain 'on' in the status line.. Was looking for the same effect as abort where the study becomes toggled off..
Its no big deal anyway
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Abort a study without a run-time error
That would be an useful feature, but is not possible (see Shut down an indicator via code? is it possible?).Its works in stopping the calculation but the study remain 'on' in the status line.. Was looking for the same effect as abort where the study becomes toggled off..
Edit: There's a feature request that asks for this with the help of hotkeys: MC-1136 - Enabling / Disabling Indicators via a HotKey Combination option.