How to program remarks signs (//) before #property - according to an external varaible
something like "extern bool choice "
if choice = true indicator will display in <price overlay> mode.
if choice = false it will display in <separate window> mode
This is a preprocessor compiler directive. You cannot put a run-time conditional on compiler directives.
Anthony Garot:
can u explain
paulselvan:
can u explain
Create two different indicators:
1. indicator will display in <price overlay> mode
2. it will display in <separate window> mode
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
I want to share a tips which displays price overlay of two instruments.
-----------------------------------------------------------------------------------------
Let's say we want to study USDCAD & WTI correlations.
Here is double_chart.mq4 indicator which displays WTI
If we play with these two global scop #property :
#property indicator_separate_window
#property indicator_chart_window
we can have WTI built-in USDCAD chart
-----
Procedure :
1)Compile double_chart.mq4 in MQL editor with #property like this :
2)Then open USDCAD chart and double_chart.mq4 indicator.
3)Return to MQL editor and this time set #proprty like this :
4)Compile it again : we can see USDCAD and WTI in the same chart( auto-sized )
----------------------------------------
How to program remarks signs (//) before #property - according to an external varaible
something like "extern bool choice "
if choice = true indicator will display in <price overlay> mode.
if choice = false it will display in <separate window> mode
Thanks