I suggest that this
void OnTick()
{
static datetime prev_time=0;
if(prev_time==iTime(0))
return;
prev_time=iTime(0);
replace it with this{
static datetime prev_time=0;
if(prev_time==iTime(0))
return;
prev_time=iTime(0);
void OnTick()
{
static datetime prev_time = 0;
static const int period = PeriodSeconds();
const datetime NewTime = TimeCurrent() / period;
if(prev_time == NewTime)
return;
prev_time = NewTime;
{
static datetime prev_time = 0;
static const int period = PeriodSeconds();
const datetime NewTime = TimeCurrent() / period;
if(prev_time == NewTime)
return;
prev_time = NewTime;
Hello this EA isnt working with me what time frame is used for it?
the ea is not working , please take a look at it and get back to us
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Simplest Hedging EA ever:
Author: Vladimir Karputov