Does this chunk of code mean that we should trade on H1?
double MA=iMAGet(0); if(MA==0.0) // copying fails return; if(!RefreshRates()) { PrevBars=iTime(m_symbol.Name(),Period(),1); return; } if(m_symbol.Ask()<MA) need_open_buy=true; else if(m_symbol.Bid()>MA) need_open_sell=true;
Does this chunk of code mean that we should trade on H1?
When you post code please use the SRC button !
Forum on trading, automated trading systems and testing trading strategies
Alain Verleyen, 2014.07.04 17:19
Hello,
Please use the CODE button when you post code.
Thank you.
Does this chunk of code mean that we should trade on H1?
double MA=iMAGet(0); if(MA==0.0) // copying fails return; if(!RefreshRates()) { PrevBars=iTime(m_symbol.Name(),Period(),1); return; } if(m_symbol.Ask()<MA) need_open_buy=true; else if(m_symbol.Bid()>MA) need_open_sell=true;
No. In this piece of code, there is nowhere to mention the timeframe PERIOD_H1.
double MA=iMAGet(0); if(MA==0.0) // copying fails return; if(!RefreshRates()) { PrevBars=iTime(m_symbol.Name(),Period(),1); return; } if(m_symbol.Ask()<MA) need_open_buy=true; else if(m_symbol.Bid()>MA) need_open_sell=true;
Have you read the description exactly? See:
"4. When to open the first trade: BUY if the 200 EMA is below the new bar. SELL is the 200 EMA is above the new bar."
Have you read the description exactly? See:
"4. When to open the first trade: BUY if the 200 EMA is below the new bar. SELL is the 200 EMA is above the new bar."
Did you read what you wrote in the code?
The EA is doing the opposite of what is presented in the presentation above, however the code is working correctly.
Vladimir, there are two parameters in the code:
ushort InpIndentAfter8th = 10; // Indent after the 8th position (in pips) ushort InpIndentAfter9th=10; // Indent after the 8th position (in pips)
but
InpIndentAfter9th
is not used anywhere, is it you changed your mind to use it or just overlooked it?
Thanks!
Vladimir, there are two parameters in the code:
but
is not used anywhere, did you change your mind to use it or just overlooked it?
Thank you!
It was me experimenting, adding, removing and eventually not removing all the rubbish.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use

GalacticExplosion:
Author: Vladimir Karputov