I have programmed my own indicator, whose values are calculated from the price[] buffer.
The indicator code contains the line:
#property indicator_applied_price PRICE_MEDIAN
When I insert the indicator into the chart, I can select the desired applied price on the Parameters tab, based on which the indicator is calculated.
However, if I want to test the behavior of the indicator in the visual tester, I have not found a way to set this applied price, and the indicator is calculated using the close price, even though the default is the median price.
Is it possible to set the applied price in the visual tester?
- Drag and drop SL and TP in the tester.
- Is it possible to disable the Parameters tab ?
- iCustom and #property indicator_applied_price
And one more additional question that does not concern the visual tester.
Is it possible to use code to find out what the selected applied price is?
The answer for the first question is no (this is a flaw in MQL5/MT5 implementation). For the second try _AppliedTo.
Documentation on MQL5: _AppliedTo / Predefined Variables
- www.mql5.com
The _AppliedTo variable allows finding out the type of data, used for indicator calculation: Example: See also...
Petr Nosek #:
Thanks for your reply. I thought so, but I wasn't sure.
Thanks for your reply. I thought so, but I wasn't sure.
Please, read the edited version of my reply. It was not completely correct from the beginning (there are other problems with #property indicator_applied_price, which I mixed up with your difficulties).
You're reading (and quoting text) tooooo fast. ;-)
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