Hi,
I would like to try optimisation tests based on the time.
I can define a trading hour to enter long or short but I would like to insert 2 variables in my trading times in order to optimize :
defparam cumulateorders = false
TradingHour = Time = a'0000'
TradingHourOut = Time = b'0000'
condenterlong=close<close[1] and TradingHour
condexitlong=TradingHourOut
IF NOT LongOnMarket AND condenterlong THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
If LongOnMarket AND condexitlong THEN
SELL AT MARKET
ENDIF
As you can see my variables are a and b
Thanks
What I would do is:
TradingHour = a
TradingHourOut = b
and then set the range in the optimisation box, for example:
a 070000 to 100000 in steps of 10000
b 150000 to 210000 in steps of 10000
Unless I’ve misunderstood what you want to achieve?
That is exactly what I want to achieve.
I have no computer tonight but I will try it tomorrow.
Thanks for your help!
Your solution seems to work properly, thanks again, I am going to do some “curve fitting” 🙂
I am going to do some “curve fitting” 🙂
If only I’d known to buy on a Tuesday at 1432 and sell on Wednesday at 1559 then I’d be a rich man.
At least you are going into this study knowing that there is a huge potential for data mining when using time as a variable. 🙂
I have spent more than one hour on it and even with overfitting I can barely reach a profit factor of 2 and more than 50% of winning trades… The time window 17h00-18h00 seems to be the most interesting window to work on but for now it is extremely disappointing…