ichiHandle=iIchimoku(NULL,0,tenkan_sen,kijun_sen,senkou_span_b); ///////////////////////////////////// double GetIchi(const int buffer,const int index) { double Ichimoku[1]; ResetLastError(); if(CopyBuffer(ichiHandle,buffer,index,1,Ichimoku)<0) { return(0.0); } return(Ichimoku[0]); } double Chiko=GetIchi(CHIKOUSPAN_LINE,1); double Ten=GetIchi(TENKANSEN_LINE,1);
Good-looking code!
NOTE: Traders and coders are working for free:
- if it is interesting for them personally, or
- if it is interesting for many members on this forum.
Freelance section of the forum should be used in most of the cases.

- 2024.12.12
- www.mql5.com
Good-looking code!
NOTE: Traders and coders are working for free:
- if it is interesting for them personally, or
- if it is interesting for many members on this forum.
Freelance section of the forum should be used in most of the cases.
Iam programmer and i don't want to order ea. i just have a simple question.
I am confused. should i ask my question in other section?
Please show how you are outputting that number. Your code only shows how you are obtaining it, not how you are outputting it.
If possible, provide sample code that can compile and be run by others to replicate the issue.
Just print
Print("Ten: " + DoubleToString(Ten)); Print("Chiko: " + DoubleToString(Chiko));
I create a test ea, put the complete code on it.
Please show your own log output results first so we can see what you are getting, Show a screenshot of the chart and log output, and remember to inform us of which Symbol and Timeframe you are using it on.
I sent complete source of EA, Did you see that? output is ok for you?
it's my output:
metatrader 5
XAUUSD M30
At bar shift 1, there is no "Chikou Span". Based on your Indicator parameters, it is only present at bar shift 26 onwards.
int g_hIchimoku; int OnInit() { g_hIchimoku = iIchimoku( _Symbol, _Period, 9, 26, 52 ); if( g_hIchimoku == INVALID_HANDLE ) return INIT_FAILED; return INIT_SUCCEEDED; }; double GetIchimoku( const int nBuffer, const int nIndex ) { if( BarsCalculated( g_hIchimoku ) > 1 ) { double adbIchimoku[ 1 ]; if( CopyBuffer( g_hIchimoku, nBuffer, nIndex, 1, adbIchimoku ) > 0 ) return adbIchimoku[ 0 ]; }; return EMPTY_VALUE; } void OnTick() { double dbTenkansenLine = GetIchimoku( TENKANSEN_LINE, 1 ), dbChikouSpan = GetIchimoku( CHIKOUSPAN_LINE, 26 ); Print( "Tenkansen Line: ", dbTenkansenLine ); Print( "Chikou Span: ", dbChikouSpan ); };

- 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
I have this code and tenkan(and other lines) give me a right number like: 1796.84000000 but chiko line give me weird number like this:
1797837654782487239838475546179126438923985281308142746314871387413629181284137038568723562825372865487563487564785634785638756873465873465837465837456837456873456834756837456834756348756381476534865.000000
What is the problem?