Hi, I have a problem concerning the programming of an automatic trading system (I specify that I am a beginner …), namely: if I want the first operation of the day to have different conditions from the rules that I will then apply in the rest of the trading day, which instructions should I give to the trading system? Thank you for your understanding and any help you can give me.
if I want the first operation of the day
If above means first run of the code at day open then you could use (not code as we not sure yet).
What Timeframe is your Chart running on and what time is day Open day close etc?
If Time = 08000 (for example) then
follow these conditions
Endif
If Time > 080000 AND Time < 210000 Then
follow these conditions
Endif
There you go:
ONCE FirstTime = 1
IF IntraDayBarIndex = 0 THEN
FirstTime = 1
ENDIF
IF myConditions1 AND FirstTime THEN
BUY 1 CONTRACT AT MARKET
FirstTime = 0
ENDIF
IF myConditions2 AND Not FirstTime THEN
BUY 1 CONTRACT AT MARKET
ENDIF
you are truly wonderful, thank you very much for your precious answers, I will try and then I’ll send you a feedback!!