Coding help - page 286

 

[Цитата = mrtools; 683386] Air92, читайте здесь https://www.mql5.com/en/forum/general с АО неограничен не думаю, что будет никакой пользы. пс), может быть, можно попробовать 5 х 34 ЕМА средней креста цен или зон Ао возможно, это будет близко к тому, что вам нужно. [/ QUOTE] Спасибо большое, господин Инструменты для ответа. Я uderstood вас.

Files:
 

Dear Mladen,You found recently this MAСD interesting, I simply want to ask. What basic distinction between MAСD and AO, after all we see that MAKD can be made on main a chart, AO isn't possible. Why?

Thank you.

Files:
mac3d.gif  60 kb
 
Air92:
Dear Mladen,You found recently this MAСD interesting, I simply want to ask. What basic distinction between MAСD and AO, after all we see that MAKD can be made on main a chart, AO isn't possible. Why? Thank you.

Air92

I told that it is a "sort of a macd"

As we know, macd is a difference of 2 ema moving averages. If you draw those two moving averages you will see two components of the macd, not the macd itself (not the difference otself as in macd indicator).

The same is with AO : AO is simply a difference of a sma 5 and sma 34. You can draw them on the chart, crosses will be exactly where AO crosses zero line, but that is not an AO : those are two components making the AO. So, as a solution, you just draw sma 5 and sma 34 on chart and that will be a "sort of an AO" but that is not an AO. AO is operating in different range of values from the prices on the chart

 
mladen:
Air92

I told that it is a "sort of a macd"

As we know, macd is a difference of 2 ema moving averages. If you draw those two moving averages you will see two components of the macd, not the macd itself (not the difference otself as in macd indicator).

The same is with AO : AO is simply a difference of a sma 5 and sma 34. You can draw them on the chart, crosses will be exactly where AO crosses zero line, but that is not an AO : those are two components making the AO. So, as a solution, you just draw sma 5 and sma 34 on chart and that will be a "sort of an AO" but that is not an AO. AO is operating in different range of values from the prices on the chart

Thank you for the detailed answer.

Absolutely other question, in mt4 we have Japanese candles, bars and lines. You made the indicator the display price volume for HA offline. It in accuracy copies the line. But it is interesting to me why it, as well as the line, loses shadows of candles?

 
Air92:
Hello Dear Mladen.

Please, I want you to ask to remake this indicator on a chart.That the price could be replaced in the form of the line AO, if it is possible. MACD actually isn't necessary in this indicator.

If you have time, make it please.

Air92, please read here https://www.mql5.com/en/forum/general since AO is unbounded don't think it would be any good.

ps) maybe can try a 5 x 34 ema of median price cross or the Ao zones maybe it will be close to what you need.

ps2) correction should be a 5 x 34 sma(not ema) for a pure AO.

 

If the line draws on bar closing, and opening on the same place, but it after all not always in reality. It turns out that we lose part of the price.Сonnects points of closing of bars on history, but in real drives the line behind the price. but fixes on closing

 
Air92:
Thank you for the detailed answer. Absolutely other question, in mt4 we have Japanese candles, bars and lines. You made the indicator the display price volume for HA offline. It in accuracy copies the line. But it is interesting to me why it, as well as the line, loses shadows of candles?

It does not lose the color of the candle

See the example : the color of the body is exactly as it should be (the color of the wick, on the other hand, if that is what you mean, is drawn by metatrader 4 and the rules for the colors of the wick are determined by metatrader not the code that generates offline data) :

Files:
ha_offline.gif  79 kb
 
mladen:
It does not lose the color of the candle See the example : the color of the body is exactly as it should be (the color of the wick, on the other hand, if that is what you mean, is drawn by metatrader 4 and the rules for the colors of the wick are determined by metatrader not the code that generates offline data) :

Thanks, Mladen. I understand now.

HA offline with so step ma pdf-this the best that to me it was necessary to see. Your step ma indicator well proves to be not only offline, but also on any tool, beginning from M15, if to pick up ma step.

Now I use it to take the general direction, but I look for the best entrance on m1, therefore I try to simplify the price on a minute chart.

For this reason I was hooked for AO in the form of line ,because at certain settings, I see not AO, but absolutely other indicator which well simplifies the price.

 

sorry my bad, have mixed them up while still using the crrect one already dojh!

stupid metaquotes for changing everythiung

 

Hello, I'm trying to extract the highest and lowest value for x periods of the main line of a stochastic in a buffer. I've read somewhere I need to make an Array with the values, but it doesn't work. So far I'm stuck with this code. Am I doing right, can someone help me with this ? Thanks a lot. Regards.

double num_array[1]={iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,CustomPeriod)};

int gmax=ArrayMaximum(num_array[1],WHOLE_ARRAY,0);

int gmin=ArrayMinimum(num_array[1],WHOLE_ARRAY,0);

MinBuffer=gmin;

MaxBuffer=gmax;

Reason: