Hi,
I’m doing a simple strategy, just to verify how a ticket like Soybean ZS behave buying at first hour of day and selling last hour.
DEFPARAM CumulateOrders=false
OrarioInizioGiorno=000000
OrariofineGiorno=200000
TIMEFRAME(1 hour,default)
IF (DayOfWeek = KK) and time=OrarioInizioGiorno THEN
buy 1 shares AT MARKET
ENDIF
IF time=OrariofineGiorno THEN
sell 1 shares AT MARKET
ENDIF
KK goes from 1 to 5. it works until 2015 and nothing more after. any idea why?
thank’s in advance for your answer.
Alessio
Will you please attach the ITF file?
JSParticipant
Senior
Hi,
I think that over time the trading hours have been adjusted, when you use the correct trading hours the system works…
(Remember that the position is opened on the OPEN of the next bar… an hour later)
DEFPARAM CumulateOrders=false
TimeFrame(1 Hour, default)
OrarioInizioGiorno = 020000
OrariofineGiorno = 190000
IF DayOfWeek=1 and NOT OnMarket and OpenTime=OrarioInizioGiorno THEN
BUY 1 contract AT MARKET
ENDIF
IF OnMarket and OpenTime=OrarioFineGiorno THEN
SELL AT MARKET
ENDIF