Download MetaTrader 5
To add comments, please log in or register
Do you know that MQL5 is an object-oriented language?
whroeder1
14229
whroeder1 2016.09.07 14:21  
  1. FMIC: @Torgen, the user WHRoeder is telling you that the code statements "if ( ExtBuffer2[0])" and "if (ExtBuffer1[0])" don't do anything at all. If you want to check for a change you must compare it with something in order for a boolean result to be returned to the "if()" function.
    Actually that is wrong. They do something, they test the color of the bar. ExtBuffer2[0] will be nonzero (true) if the minusD1 is above the plusD1.
  2. FMIC's suggestion to use EMPTY_VALUE is a good one, but off the OPs original question.
  3. Torgen: but it sound in every single bar (histogram) and I just want the alarm in the first red and green bar, 
    You need to test the current bar's direction and wether the previous bar is or is not the same.
/ /12
To add comments, please log in or register