Strategy Backtester

J

john3

New member
VIP
Hello Everyone ,

You can request a backtest for your current strategies here.

Thanks
Hello sylar2017,

Regardless of a strategy, how would I limit the backtest only to the regular trading hours (RTH)? I trade futures and always have an overnight session displayed, but for a backtest I only would like to test the RTH.

In addition, also regardless of a strategy, but let's say it is a simple MAs cross, I would like to know an average price move after a signal has been triggered. For example, 10 SMA crossing 20 SMA both ways (up/down), the strategy enters on the next bar open after the cross, what is an average price move after the cross? It would be great if after the cross it would automatically plot a line with a user-selectable target. For example, after the cross, plot a line 2 point away from the cross.

Appreciate your help!
 
BenTen

BenTen

Administrative
Staff
VIP
@john3 You can try to apply the same method @WalkingBallista did in his code here.

Code:
def MarketOpenTime = 0930;
input TimeToStopSignal = 1525;
def TradeTimeFilter = SecondsFromTime(TimeToStopSignal);
Use that condition to only allow signals between market open and 1525 (which is 3:25 EST). Take a look at the full code in the post I linked. It should help.
 

Top