how to set stop trading time before market close?

Questions about MultiCharts and user contributed studies.
martingale
Posts: 91
Joined: 10 Dec 2010
Has thanked: 2 times
Been thanked: 1 time

how to set stop trading time before market close?

Postby martingale » 07 Mar 2019

in backtest, i found that some position are entered even after market close. how to set the strategy so that say it won't enter new position, and close out all existing position, 10 minutes before close.

User avatar
TJ
Posts: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: how to set stop trading time before market close?

Postby TJ » 07 Mar 2019

in backtest, i found that some position are entered even after market close. how to set the strategy so that say it won't enter new position, and close out all existing position, 10 minutes before close.

See post #15
[FAQ] Autotrade / Backtest / Optimization
viewtopic.php?t=10811

User avatar
Smoky
Posts: 518
Joined: 03 Dec 2010
Location: Thailand
Has thanked: 99 times
Been thanked: 121 times

Re: how to set stop trading time before market close?

Postby Smoky » 09 Mar 2019

You can try (market 8h00 22h00)

Code: Select all

IF ((Time > 800) and (Time < 2200) and ...then
begin
.....
end;
don't worry even you are flat at end of every days connecting line would connect your last flat trade to the first trade of your next trading day ...


Return to “MultiCharts”