You haven't really followed the advice in the other thread.
Don't use == because it is not good practice for comparing doubles. Either check for a cross (price was above ichimoku but now it is below) or make sure you limit how many orders are placed.
Put your code to check and open orders in OnTick(), not in OnInit()
Make sure you are calling the correct mode of Ichimoku. Some, like MODE_CHIKOUSPAN, do not have a value for the current bar.
You haven't really followed the advice in the other thread.
Don't use == because it is not good practice for comparing doubles. Either check for a cross (price was above ichimoku but now it is below) or make sure you limit how many orders are placed.
Put your code to check and open orders in OnTick(), not in OnInit()
Make sure you are calling the correct mode of Ichimoku. Some, like MODE_CHIKOUSPAN, do not have a value for the current bar.
so if i need senkouspan A for the current bar, i have to compensate on shift?
No, there is a Senkou Span A for the current bar. It is only Chikou Span that doesn't.
Add the ichimoku indicator to a chart and open Data Window (CTRL+D)
You can move you mouse over the bars and see the values change
Forum on trading, automated trading systems and testing trading strategies
mrluck1, 2017.01.24 19:14
your link only shows indicator, but i need an EA, could you provide me this simple code? thanksNo. I provided the link to you about everything - indicators and the EAs (and you can find it by yourself because I just used Search feature on this forum).
Ichimoku Kinko Hyo System - expert for MetaTrader 4Kijun Sen Robot (KSRobot) - expert for MetaTrader 4
ichimok2005 - expert for MetaTrader 4
Kijun Sen Robot - expert for MetaTrader 5 (this EA was published today)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
someone please just show me a simple code in mql4:
lot=0.01
if price= ichimoku
then ordersend
just as simple as that, thank you