No, you can't force a default for when a custom indicator uses the applied price form of the OnCalculate event handler.
No, you can force a default for when a custom indicator uses the applied price form of the OnCalculate event handler.
Dear Fernando, there is a solution for that. I read in the forum that you can use property indicator_applied_price, like this: #property indicator_applied_price PRICE_CLOSE
I will test it!
I was unaware of that possibility. So I searched the documentation and found it there ...Documentation on MQL5: Language Basics / Preprocessor / Program Properties (#property)
indicator_applied_price
Specifies the default value for the "Apply to" field. You can specify one of the values of ENUM_APPLIED_PRICE. If the property is not specified, the default value is PRICE_CLOSE
Thank you for the update.
I was unaware of that possibility. So I searched the documentation and found it there ...Documentation on MQL5: Language Basics / Preprocessor / Program Properties (#property)
indicator_applied_price
Specifies the default value for the "Apply to" field. You can specify one of the values of ENUM_APPLIED_PRICE. If the property is not specified, the default value is PRICE_CLOSE
Thank you for the update.
You are welcome, sir!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear devels,
Is it possible to change the default _AppliedPrice for a custom indicator? It always start with Close when inserted in a graph. Anyone knows how to force it initiate with another value?