//+------------------------------------------------------------------+ //| OpenBuy.mq4 | //| Copyright © 2008, RoboFx | //| http://www.robofx.org | //+------------------------------------------------------------------+ #property copyright "Copyright © 2008, RoboFx" #property link "http://www.robofx.org" #property show_inputs extern double Lots = 0.1; extern int StopLossPips = 30; extern int TakeProfitPips = 40; extern int SlipPagePips = 1; //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int start() { if(Digits==5) { StopLossPips*=10; TakeProfitPips*=10; SlipPagePips*=10; } OrderSend(Symbol(), OP_BUY, Lots, Ask, SlipPagePips, Ask-StopLossPips*Point, Ask+TakeProfitPips*Point, "Buy", 0, 0, Blue); //---- return(0); } //+------------------------------------------------------------------+