Download MetaTrader 5

One indicator for chart window and separate window?

To add comments, please log in or register
Andriy Moraru
1274
Andriy Moraru  
Is it possible to have one indicator draw simultaneously in chart window and in separate window?
onewithzachy
2264
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
406
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
26433
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.
eevviill7
20280
eevviill7  

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

and he will draws on main chart. 

Files:
Roberto Jacobs
49622
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.
Thierry Ramaniraka
422
Thierry Ramaniraka  
Roberto Jacobs:
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.

Hello,
Is it possible with buffers (not ObjectCreate) ?

whroeder1
18228
whroeder1  
Thierry Ramaniraka: Is it possible with buffers (not ObjectCreate) ?

No. Buffers go to the specified window (separate.)

To add comments, please log in or register