Log in

View Full Version : (Ask) error 130 mql4


Permenkaret
20th November 2011, 02:01 AM
perlu bantuan untuk koreksi ea, setiap order selalu error 130. stoploss diset 200 dan takeprofit 400. ini kode untuk open buy



void Open_Buy(double OPB)

{

int ticket;

RefreshRates();

if (StopLoss < batas) StopLoss = batas;

if (TakeProfit < batas) TakeProfit = batas;



Print("batas "+DoubleToStr(batas,0));

Print("stop level "+DoubleToStr(MarketInfo(Symbol(),MODE_STOPLEVEL), 0));

Print("Ask "+DoubleToStr(Ask,Digits));

Print("StopLoss "+DoubleToStr(Ask-StopLoss*Point,Digits));

Print("TakeProfit "+DoubleToStr(Ask+TakeProfit*Point,Digits));



ticket=OrderSend(Symbol(),OP_BUY,1,NormalizeDouble (Ask,Digits),Slippage ,NormalizeDouble(Ask-StopLoss*Point,Digits),NormalizeDouble(Ask+TakePro fit*Point,Digits),"Open Buy",MagicNumber,DarkViolet);

if(ticket < 0)

Print("Error opening BUY order : ",GetLastError());

else

Print("Open BUY "+DoubleToStr(OPB,3));

}



ini hasil ketika ea dijalankan

http://u.kaskus.us/36/84xekotc.png

</div>