Download MetaTrader 5

Alarm just in the first histogram Bar - page 2

To add comments, please log in or register
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.
To add comments, please log in or register