Hi everyone,
is it possible turn on/off the auto trading (AA) by the code ?
thanks
Turn ON/Off autotrading by code
- Vlada MultiCharts
- Posts: 293
- Joined: 22 Apr 2020
- Has thanked: 8 times
- Been thanked: 76 times
Re: Turn ON/Off autotrading by code
Hello Mik72,
Yes, it is possible to do it by using the keyword CommandLine(".at_toggle");
Please note that if it is used to turn auto trading on, the popped up confirmation window cannot be skipped and a manual click on "OK" is required.
More info can be found here: https://www.multicharts.com/trading-sof ... ommandLine
Yes, it is possible to do it by using the keyword CommandLine(".at_toggle");
Please note that if it is used to turn auto trading on, the popped up confirmation window cannot be skipped and a manual click on "OK" is required.
More info can be found here: https://www.multicharts.com/trading-sof ... ommandLine
Re: Turn ON/Off autotrading by code
Hello,
I tried this piece of code to turn off a strategy after a certain time (it is a bit confusing because the command takes more than 20 seconds to execute).
I was wondering something, while turing off the strategy the popped up confirmation window with active orders and positions appears.
Can this pop up be skipped by code when turning OFF a strategy?
Many thanks in adavance.
I tried this piece of code to turn off a strategy after a certain time (it is a bit confusing because the command takes more than 20 seconds to execute).
Code: Select all
if currenttime_s >=142040 then begin
once begin
CommandLine(".at_toggle");
end;
end;
Can this pop up be skipped by code when turning OFF a strategy?
Many thanks in adavance.
- Vlada MultiCharts
- Posts: 293
- Joined: 22 Apr 2020
- Has thanked: 8 times
- Been thanked: 76 times
Re: Turn ON/Off autotrading by code
Hello Tibouss,Hello,
I tried this piece of code to turn off a strategy after a certain time (it is a bit confusing because the command takes more than 20 seconds to execute).
I was wondering something, while turing off the strategy the popped up confirmation window with active orders and positions appears.Code: Select all
if currenttime_s >=142040 then begin once begin CommandLine(".at_toggle"); end; end;
Can this pop up be skipped by code when turning OFF a strategy?
Many thanks in adavance.
I'm afraid, this confirmation window cannot be skipped from code. You can only set it in main MultiCharts window - File - Preferences - Trading - Auto trading options.
An alternative solution for enabling/disabling auto trading from script can be found here:
viewtopic.php?t=52722