Forum

How to calculate the sum of the newest 240 data in the array?

#property strict #property indicator_separate_window #property indicator_buffers 17 //#property indicator_color1 DarkGreen // Color of the 1st line //#property indicator_color2 Navy // Color of the 2nd line //#property indicator_color3 Yellow // Color of the 1st line //#property

How to calculate the higher high and previous higher high?higher high:if(high[3]>high[2] && high[3]>high[1] && high[3]>high[4] && high[3]>high[5])higherhigh= high[3]

higher high:if(high[3]>high[2] && high[3]>high[1] && high[3]>high[4] && high[3]>high[5])highe rhigh= high[3] please show me the code,thank u

Problem when replace iMA with iMAOnArray

original code: why the result is different?It should be the same! for (i=bars;i>= 0 ;i--) { ma = iMA ( "NZDUSD" , 0 ,periodMA, 0 , 0 , PRICE_MEDIAN ,i);//replace with iMAONArrey for (i=bars;i>= 0 ;i--) { double haHigh = iHigh ( "NZDUSD" , 0 ,i); double haLow = iLow ( "NZDUSD" , 0

EA problem.

if close-open >0.01 on H4 chart,then we were in up trend. if close-open < -0.01 on H4 chart,then we were in down trend. if close-open >0.005 on H1 chart,then we send buy order(buy signal). if close-open < -0.005 on H1 chart,then we send buy order( sell signal ). Before I run the EA how can I tell EA

How to make this EA work with other EA?

This is the EA I want to modify to work with others.It's a simple grid EA.It use AccountBalance() and AccountEquity(),so when other EA have oders in list. This EA can't work correctly.Someone please help. extern int Step = 170 ; extern double FirstLot = 0.1 ; extern double IncLot = 0.0 ; extern