//+------------------------------------------------------------------+ //| baiso1.mq4 | //| Copyright 2016, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2016, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- if(OrdersTotal()>0){return;} // chi cho vao 1 lenh // "EURUSD" string // 1,2,3, int // 1.2 , -58.6 double // true , false bool string sym = "USDJPY"; sym = "AUDUSD"; sym = "GBPUSD"; int loaiLenh; loaiLenh = OP_SELL; // buy -- > Ask --> // sell --> Bid --> // buystop --> giavaolenh > gia hien tai // sell stop --> gia vao lenh < gia hien tai // double khoiLuong; khoiLuong = 0.1; double stoploss = 1.2927; double takeprofit = 1.28; string ghichu = "hello"; color maucualenh = clrRed; OrderSend( sym,loaiLenh,khoiLuong,Bid,20,stoploss,takeprofit,ghichu,0,0,maucualenh ); } //+------------------------------------------------------------------+