Why is this global scope
double Tenkan_value = iIchimoku(NULL, 0,9,26,52, MODE_TENKANSEN, 1); double Kijun_value = iIchimoku(NULL,0,9,26,52, MODE_KIJUNSEN, 1); double Chinkou_value =iIchimoku(NULL,0,9,26,52, MODE_CHINKOUSPAN, 1); double senkouA=iIchimoku(NULL,0,9,26,52,3,1); double senkouB=iIchimoku(NULL,0,9,26,52,4,1);
Surely it should be in start() ?
Why is this global scope
Surely it should be in start() ?
double Tenkan_value = iIchimoku(NULL, 0,9,26,52, MODE_TENKANSEN, 1); double Kijun_value = iIchimoku(NULL,0,9,26,52, MODE_KIJUNSEN, 1); double Chinkou_value =iIchimoku(NULL,0,9,26,52, MODE_CHINKOUSPAN, 1); double senkouA=iIchimoku(NULL,0,9,26,52,3,1); double senkouB=iIchimoku(NULL,0,9,26,52,4,1);
It has no effect if i put it in start() ....
The problem is not that it has no effect in start()
The problem is with
if (senkouA>=senkouB && Bid > senkouA && Chinkou_value> Bid) // and if (senkouA<=senkouB && Bid > senkouB && Chinkou_value> Bid)
The ChinkouSpan value will always be zero for bar[1]
therefore it will never be > Bid
Note that you increment count every tick whether a new object is created or not.
Also, you do not delete the objects in deinit, that means that if you change timeframes, the objects from the first timeframe will remain on the chart.
The problem is not that it has no effect in start()
The problem is with
The ChinkouSpan value will always be zero for bar[1]
therefore it will never be > Bid
Note that you increment count every tick whether a new object is created or not.
Also, you do not delete the objects in deinit, that means that if you change timeframes, the objects from the first timeframe will remain on the chart.
Thank you for this answer, but how would you solve the problem with the chikou value (because i need it in my EA)...
I replaced the 0 in the ChinkouSpan function by 26, but now the chikou value is the same as the Bid value... I really don't understand...
int start() { double Chikou_value =iIchimoku(NULL,0,9,26,52, MODE_CHINKOUSPAN, 26); double senkouA=iIchimoku(NULL,0,9,26,52,3,1); double senkouB=iIchimoku(NULL,0,9,26,52,4,1); printf("valeur chikou %e ",Chikou_value); printf("valeur Bid %e ",Bid); return 0;
If you ask this question means that you need to ask someone to fix it for you.
https://www.mql5.com/en/job
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi everyone !
I've tested my EA based on Ichimoku technic, it suppose to display an arrow up when Ichimoku indicates a Buy signal and an arrow down when it indicates a sell signal, but i see no arrow on the graph, just the Ichimoku curves (and i didn't asked my EA to show those...)
Here is my code, feel free to test it...
Cheers
Aymeric