limiting trading hours
1 replies
disqplay
8 years ago #113789
First thank you Tomas for fixing my log in problem and the link you sent concerning the question I had but it did not really answer my question for using time functions in eawizard.
Just as and example let us assume the following I only want my EA to trade during the hours of 0600 broker time to 1800 hours broker time using a moving average cross over.
so something like the following
start hour = 0600
end hour = 1800
if timecurrent >= start hour and timecurrent <= end hour and ema8 crosses up ema13 go long
or if ema8 crosses down close long and go short
note should close all trades when time current = 1800 and no further long or short from 1800 to 0600 the next day. but during the hours of 0600 to 1800 should trade freely between long and short
Disqplay
tomas262
8 years ago #130836
Hello,
I created a strategy sample of an EMA cross strategy that enters long only between 6 and 18. See the file attached.
Viewing 1 replies (of 1 total)