Forum

DaysOfMonth() question

if (Month()== 1 && DaysOfMonth() == 30 || DaysOfMonth() == 31 ) return ( 0 ); can I use DaysOfMonth() like above

deleting all pending if found one working order

all pending orders should be deleted if an active order is available ... what I 'm doing wrong ? for (pos = OrdersTotal ()- 1 ; pos >= 0 ; pos--) if ( OrderSelect (pos, SELECT_BY_POS) && OrderMagicNumber () == Magic && OrderSymbol () == Symbol () ){ nOrders++; } if ( OrdersTotal () > 0 &&

bar size and wick size in one condition

I'll try to combine min bar size and max wick size in one condtion but it wont work, each condition working only seperated ... How to use it both together like below? bool BuyBarSize= false ; if (Close[ 1 ] > Open[ 1 ] && (High[ 1 ]-Low[ 1 ]) >= MinPipSize*point && (Open[ 1 ]-Low[ 1 ]) <=

EA avoid All Day high news with ffcal

Guys, how can I avoid open orders with ffcal newsfilter on "All Day" high news like below? Is this happen when <forecast/><previous/> have empty values (see below) f. ex. if(MinToNews < =MinsBeforeNews && ImpactToNews> =MinimumImpact && forecast==NULL && previous==NULL) < event > < title >

all open orders - OrdersTotal()

i need to count the total open orders by all charts ... can I use simply? bool countok = false; if ( OrdersTotal () <= 3 ) { countok = true ;}

detect previous 3 candles close price

I want to check for valid entrys on previous 2 candles and current f.ex. -------- 3 | 1.86 -------- 2 | 1.87 -------- 1 | 1.88 = new candle -------- Buy if candle 3 < as candle 2 and new candle is higher as candle 2 1x blue 2x red = sell the new bar is calculated by new bar open price which should

avoid multiple signals while AO is up or down

how can I prevent multiple signals in a EA? If AO is up it should only trigger one signal at the beginning and wait until AO is below 0.0000 I'll tried this but without success :-) // Awesome double aog = iCustom ( Symbol (), 0 , "Awesome" , 1 ,CandleShift); //green double aor = iCustom ( Symbol ()

EMA Cross EA how to add distance between cross?

double MA1 = iMA ( NULL , 0 , 5 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); double MA2 = iMA ( NULL , 0 , 15 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); if (MA1 > MA2 && ....) { Buy= true ; } how can I add a min. distance fex. in points after the cross and what would be the best way? signal should be triggered only

EA should not trade pullback candles

how to prevent order opening if pullback candles occur? TF = H1

MA Mode Question

how do I use special modes in MA settings like: MA-Method = Linear Weighted MA-Method = Exponetial Apply to = First Indicators Data MA1 = iMA ( NULL , 0 , 11 , 0 , MODE_Linear, PRICE_First, 0 ); MA2 = iMA ( NULL , 0 , 34 , 0 , MODE_Exponent, PRICE_First, 0 );