How to only open trade in first x seconds of a new candle ?
whroeder1 is quite correct; your statement will always evaluate as true.
But with a small adjustment you could make it do what you want (i.e. restrict to the first 30 seconds of the bar):
if(TimeCurrent() <= Time[0] + 30)
How to only open trade/give signal in first x seconds of a new candle ?
I am currently creating an expert advisor, and I want them to only give a signal or open a trade if it is within the first 30 seconds of the current candle.
How do I do that ?
My idea was this but not sure if this is correct and if it works in the strategy tester:
{
}
regards,
salexes