Forum

convert UpTicks alert indi into Condition for OrderSend in EA

for (i= 0 ; i<limit; i++) { UpTicks[i]=(Volume[i]+(Close[i]-Open[i])/ Point )/ 2 ; DownTicks[i]=Volume[i]-UpTicks[i]; if (UpTicks[ 0 ]>= 100 && DownTicks[ 0 ]<= 50 ) Alert ( "BUY (" , Symbol (), ", " , Period (), ") !!!" ); } above is part of an alert from

buy script with spread targeting

//+------------------------------------------------------------------+ //| Buy with SL and TP | //| Copyright © 2008, smjones | //| sjcoinc |

Immediately "OP_BUY" EURUSD, when USDCHF order is opened by EA

//=====Hedge EU when UC is opened by EA======= for ( int pos1 = OrdersTotal ()- 1 ; pos1 >= 0 ; pos1--) if ( OrderSelect (pos1, SELECT_BY_POS, MODE_TRADES) && OrderSymbol()== "USDCHF" ) { if (OrderType()==OP_BUY || OrderType()==OP_SELL) ticket= OrderSend ( "EURUSD" ,OP_BUY,Lot,Ask, 30 , 0

merging two expression: GMT offset by DayOfYear

I'm trying to merge the DST gmt filter rules(using DayOfYear filter), but can't get it to work; this is my coding: link to "Day of Year" calendar: http://www.soils.wisc.edu/cgi-bin/asig/doyCal.rb /// I preferred this shorter version, but not working correctly in backtest /// int StartHour = 8; //