What is a 'property sheet' and the difference in 'level' properties such as: #properties indicator_levelcolor

 


#property indicator_chart_window

#property indicator_buffers 6


#property indicator_color1 Aquamarine

#property indicator_style1 3 // 'Arrow'

#property indicator_level1 233 // SOLID UP Arrow

#property indicator_width1 5


#property indicator_color2 HotPink

#property indicator_style2 3 // 'Arrow'

#property indicator_level2 234 // SOLID DOWN Arrow

#property indicator_width2 5


#property indicator_color3 Aquamarine

#property indicator_style3 3 // 'Arrow'

#property indicator_level3 251 // 'Green' SYMBOL_STOPSIGN for Close All Long Buy orders

#property indicator_width3 5


#property indicator_color4 HotPink

#property indicator_style4 3 // 'Arrow'

#property indicator_level4 251 // 'Red' SYMBOL_STOPSIGN for Close All Short Sell orders

#property indicator_width4 5


#property indicator_color5 Aquamarine

#property indicator_style5 3 // 'Arrow'

#property indicator_level5 241 // 'Green' UP Arrow to Add Long Buy orders

#property indicator_width5 5


#property indicator_color6 HotPink

#property indicator_style6 3 // 'Arrow'

#property indicator_level6 242 // 'Red' DOWN Arrow to Add Short Sell orders

#property indicator_width6 5



I'm not sure if indicator_levelN will produce the required specific WingDings for me.

However I came across one thread that speaks of a 'property sheet', which sounds like it would be very useful, but I can't find anything specific about it.

Is this just all of the PreProcessor functions and values as shown above ?

Also wondering what the difference between #properties indicator_color1 and '...level' #properties indicator_levelcolor is?

 
There is some info here that might help: https://docs.mql4.com/basis/preprosessor/compilation
 

Hi FourX,

I'm not very good with english, so my explanation may sound funny even misleading, I welcome anyone who speak english to correct me then.

#property is a define for CI, EA, or Script Window. Below is a window showing property for indicator named "separate".

#property indicatorleveln and #property indicator levelcolor, are for those horizontal line in separate chart indicator. For example if we want to draw many horizontal line in RSI, we can do that with #property indicatorleveln and #property indicator levelcolor, though we can also do that with SetLevelValue() (https://docs.mql4.com/customind/SetLevelValue) and SetLevelStyle() (https://docs.mql4.com/customind/SetLevelStyle)

The code below will produce Window property as the picture show.

:D

//+------------------------------------------------------------------+
//|                                                     Separate.mq4 |
//|                                                                  |
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 100

#property indicator_level1 50
//---- #property indicator_levelcolor Red          // 

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
  SetLevelValue (1, 30);
  SetLevelStyle( STYLE_DASHDOTDOT, 1, Yellow);
  return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit(){return(0);}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start(){return(0);}
//+------------------------------------------------------------------+

 
RaptorUK:
There is some info here that might help: https://docs.mql4.com/basis/preprosessor/compilation

Hi Raptor,

I found that one thanks. It is what lead me to believe that the PreProsessor #properties ..... are perhaps what is meant by the 'style sheet' Though the way it is termed, it sounds like it might be a completely separate file akin to a css. You know what they say: 'The only dumb question....

Been delving into MQL5 at all? If so, how are you finding it? From the descriptions of the 'Auto EA generator' it sound like it might be a whole lot simpler, easier and faster to use.. Though learning the lower level programming of MQL4, one would likely learn a lot more and have a better understanding and thus competence with higher level versions.

Wish I could find a way to use MQL4 indicators in MQL5... Ah well... back to the snake pit (< 8)

Regards,

DougRH

 
onewithzachy:

Hi FourX,

I'm not very good with english, so my explanation may sound funny even misleading, I welcome anyone who speak english to correct me then.

#property is a define for CI, EA, or Script Window. Below is a window showing property for indicator named "separate".

#property indicatorleveln and #property indicator levelcolor, are for those horizontal line in separate chart indicator. For example if we want to draw many horizontal line in RSI, we can do that with #property indicatorleveln and #property indicator levelcolor, though we can also do that with SetLevelValue() (https://docs.mql4.com/customind/SetLevelValue) and SetLevelStyle() (https://docs.mql4.com/customind/SetLevelStyle)

The code below will produce Window property as the picture show.

:D

Hi Zachy,

So the 'PreProsessor #properties.........' are what is meant by the 'style sheet' then and it is not a separate file like a css

Thanks for the assistance (< 8)

 
FourX:

Hi Raptor,

Been delving into MQL5 at all? If so, how are you finding it? From the descriptions of the 'Auto EA generator' it sound like it might be a whole lot simpler, easier and faster to use.. Though learning the lower level programming of MQL4, one would likely learn a lot more and have a better understanding and thus competence with higher level versions.

I had a bit of a play with it a couple of years ago, I converted my Big Price Indicator to mql5 just to get a feel for it . . . I haven't touched it since, back then I expected MT5 to take over gradually from MT4 . . but not quite this gradually, it seems MT5 is just not moving.

My current EA is over 3000 lines of code so I wouldn't relish the idea of converting it . . but if I had to I could, it is very modular and when I first started building it I created a test harness so I could test each function on it's own . . I could do the same with mql5 I guess.

 
FourX:
Is a Thief and Troll

Please do not feed the troll.

Reason: