Download MetaTrader 5

One indicator for chart window and separate window?

To add comments, please log in or register
Andriy Moraru
1261
Andriy Moraru  
Is it possible to have one indicator draw simultaneously in chart window and in separate window?
onewithzachy
2271
onewithzachy  
enivid:
Is it possible to have one indicator draw simultaneously in chart window and in separate window?

Hi enivid,

Nope, That's why at the beginning of the code we must specify the the display property

#property indicator_chart_window
#property indicator_separate_window

If we specify both of them, the CI will be displayed on main chart and not on separate chart.

However we can create many objects to main chart from separate chart CI, for example drawing divergence lines on main chart. 

:D 

 

Sasa Pucko
399
Sasa Pucko  
onewithzachy:

Hi enivid,

Nope, That's why at the beginning of the code we must specify the the display property

If we specify both of them, the CI will be displayed on main chart and not on separate chart.

However we can create many objects to main chart from separate chart CI, for example drawing divergence lines on main chart. 

:D 

 

answer is no and explanation is at https://www.mql5.com/en/docs/customind/propertiesandfunctions (at bottom)
Documentation on MQL5: Custom Indicators / Connection between Indicator Properties and Functions
Documentation on MQL5: Custom Indicators / Connection between Indicator Properties and Functions
  • www.mql5.com
Custom Indicators / Connection between Indicator Properties and Functions - Reference on algorithmic/automated trading language for MetaTrader 5
Alexander Voronkov
19310
Alexander Voronkov  
Andrei Moraru:
Is it possible to have one indicator draw simultaneously in chart window and in separate window?
It is possible, but depends on what the indicator.
Vasyl Nosal
18657
Vasyl Nosal  

Here. Draw not in once but cange to #property indicator_chart_window

and he will draws on main chart. 

Files:
Roberto Jacobs
47237
Roberto Jacobs  
Andrei Moraru:
Is it possible to have one indicator draw simultaneously in chart window and in separate window?
It's possible, the main indicators are separate windows,
and the second indicator in the main chart window draw with ObjectCreate.
I made like this on my indicator PricePercentRange MT4 and MT5.
To add comments, please log in or register