You should call m_ichimoku.Refresh(-1) before query data
Thanks Shaparov. Calling Refresh(-1), TenkanSen and KinjunSen works fine.
This solution not works for ChinkouSpan and SenkouSpan A and B. My problem may be the basis of mql5 documentation. You indicate same book or exemple of code?
Hello,
I'm trying to get the time when a new value in Kijun sen or Tenkan sen appears.
As I'm developing an Expert Advisor I can't use Time[] parameter of OnCalculate() in indicators.
can anyone help me?amin_mohammadi:
Try CopyTime()
Hello,
I'm trying to get the time when a new value in Kijun sen or Tenkan sen appears.
As I'm developing an Expert Advisor I can't use Time[] parameter of OnCalculate() in indicators.
can anyone help me?![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
About use of CiIchimoku class.
Above a code of EA intended for test.
When print values of ichimoku lines ChinkouSpan, TenkanSen or KinjunSen, a value is the same 1.797693134862316e+308
Thanks for help.
MqlTick m_tick ;
CiIchimoku* m_ichimoku;
int OnInit() {
m_ichimoku = new CiIchimoku();
if ( !m_ichimoku.Create(_Symbol,PERIOD_CURRENT,9,26,52) ){
Print("ERROR ON CREATE ICHIMOKU INDICATOR");
return(1);
}
return(0);
}
void OnTick(){
Print("Nome :" ,m_ichimoku.Name ());
Print("Status:" ,m_ichimoku.Status());
Print("symb:" ,m_ichimoku.Symbol(),
" cs=" ,m_ichimoku.ChinkouSpan(0),
" ts=" ,m_ichimoku.TenkanSen(0),
" ks=" ,m_ichimoku.KijunSen(0),
" last=" ,m_tick.last,
" ask=" ,m_tick.ask,
" bid=" ,m_tick.bid);
return;
}
void OnDeinit(const int reason) {
return;
}