how to set stop trading time before market close?
-
- Posts: 91
- Joined: 10 Dec 2010
- Has thanked: 2 times
- Been thanked: 1 time
how to set stop trading time before market close?
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.
- 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?
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
- 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?
You can try (market 8h00 22h00)
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 ...
Code: Select all
IF ((Time > 800) and (Time < 2200) and ...then
begin
.....
end;