Could you please tell me how in an indicator, for example, in the
Bands_handle=iBands(NULL,0,144,0,2,PRICE_CLOSE);
change PRICE_CLOSE to the value of "previous indicator", which is written manually. In the terminal it can be selected, but how to write in the code, I do not understand. The manual says that Handle is needed, but I only have a buffer. Please help.
Григорий Муратов #: Could you please tell me how to change PRICE_CLOSE in an indicator, for example in the
change PRICE_CLOSE to the value of "previous indicator", which is written manually. In the terminal it can be selected, but how to write in the code, I do not understand. The manual says that Handle is needed, but I only have a buffer. Please help.
При написании индикатора, который использует краткую форму вызова функции OnCalculate(), можно упустить то обстоятельство, что индикатор может рассчитываться не только на ценовых данных, но и на данных другого индикатора (встроенного или пользовательского - не имеет значения). Вы хотите улучшить индикатор, чтобы он правильно считался не только на ценовых данных, но и значениях другого индикатора? В этой статье мы по шагам пройдем все необходимые этапы такой модификации и выведем дополнительные полезные правила для правильного написания индикатора.
Григорий Муратов #: Подскажите пожалуйста, как в индикаторе, например в
Bands_handle=iBands(NULL,0,144,0,2,PRICE_CLOSE);
change PRICE_CLOSE to the value of "previous indicator", which is written manually. In the terminal it can be selected, but I don't understand how to write it in the code. The manual says that Handle is needed, but I only have a buffer. Please help me.
intiBands(
string symbol, // character nameENUM_TIMEFRAMES period, // periodint bands_period, // period for calculating the average lineint bands_shift, // indicator offset horizontallydouble deviation, // number of standard deviationsENUM_APPLIED_PRICE applied_price // price type or handle
);
-- "price type or handle" -- here instead of PRICE_CLOSE you can write the handle of a custom indicator.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
change PRICE_CLOSE to the value of "previous indicator", which is written manually.
In the terminal it can be selected, but how to write in the code, I do not understand.
The manual says that Handle is needed, but I only have a buffer.
Please help.
Could you please tell me how to change PRICE_CLOSE in an indicator, for example in the
change PRICE_CLOSE to the value of "previous indicator", which is written manually.
In the terminal it can be selected, but how to write in the code, I do not understand.
The manual says that Handle is needed, but I only have a buffer.
Please help.
Look at the article https://www.mql5.com/ru/articles/15
Check out the article https://www.mql5.com/ru/articles/15
Григорий Муратов #:
Подскажите пожалуйста, как в индикаторе, например в
change PRICE_CLOSE to the value of "previous indicator", which is written manually.
In the terminal it can be selected, but I don't understand how to write it in the code.
The manual says that Handle is needed, but I only have a buffer.
Please help me.
If you look at the documentation https://www.mql5.com/ru/docs/indicators/ibands -- the specification reads:
-- "price type or handle" -- here instead of PRICE_CLOSE you can write the handle of a custom indicator.
For example: