Questions from Beginners MQL5 MT5 MetaTrader 5 - page 407
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
Good afternoon.
Can you please tell me how to get the value ofTenkan andKijun on the previous candle in mql5?
Please look at the example foriIchimoku.
I was looking before I asked the question. In mql4 it was easier, for example on the last candlestick
double tenkan_sen=iIchimoku(NULL,0,9,26,52,MODE_TENKANSEN,1);
And here I understood that an object is created
handle=iIchimoku(name,period,tenkan_sen,kijun_sen,senkou_span_b);
But how to get the tenkan value out of it, I can't figure out :(. I want a simple tenkan and kijun intersection to track and that's it.
I was looking before I asked the question. In mql4 it was easier, for example on the last candlestick
double tenkan_sen=iIchimoku(NULL,0,9,26,52,MODE_TENKANSEN,1);
And here I understood that an object is created
handle=iIchimoku(name,period,tenkan_sen,kijun_sen,senkou_span_b);
But how to get the tenkan value out of it, I can't figure out :(. I want a simple intersection of tenkan and kijun and that's it.
Do you want to track in an indicator or in an EA?
In the advisor. Alerts form output with sound.
Look at function CopyBuffer().
In the example
ma_handle=iMA(Symbol(),0,period,shift,smootMode,price); - object is created
if(CopyBuffer(ma_handle,0,0,to_copy,MABuffer)<=0)return(0); - fills arrayMABuffer with values ofma_handle
And nowwe can get values fromMABuffer?
In the example
ma_handle=iMA(Symbol(),0,period,shift,smootMode,price); - object is created
if(CopyBuffer(ma_handle,0,0,to_copy,MABuffer)<=0)return(0); - fills arrayMABuffer with values ofma_handle
And nowwe can get values fromMABuffer?
Yes. In MABuffer, using the function CopyBuffer() you get the values of MA on the specified interval. MABuffer is of course an array.
Yes. In MABuffer you got the MA values on the interval you specified with the CopyBuffer() function. MABuffer, of course, is an array.
And you should do it all correctly in the procedure
intOnCalculate(constint rates_total,constint prev_calculated,
constdatetime&time[],
constdouble&open[],
constdouble&high[],
constdouble&low[],
constdouble&close[],
constlong&tick_volume[],
constlong&volume[],
constint&spread[])
Even if I want to display the value on the screen?
And this is all properly done in a procedure
intOnCalculate(constint rates_total,constint prev_calculated,
constdatetime&time[],
constdouble&open[],
constdouble&high[],
constdouble&low[],
constdouble&close[],
constlong&tick_volume[],
constlong&volume[],
constint&spread[])
Even if I want to display the value on the screen?