Detected Country () : English
Order - Buy & Sell Limit - codingforex.com

Welcome to CodingForex.Com!

Knowledge portal where you can learn how to create forex indicators and robot.

Click button below to choose level that suite you:

Order - Buy & Sell Limit

Scripts [2017-03-30 09:31:08] - by hillzx
Featured Image

void DoBuyLimit(double lot,double price,int slippage,int sl,int tp,string comment,int repeat){

for(int r=0;r<repeat;r++)
{
   int ticket;
   ticket=OrderSend(Symbol(),OP_BUYLIMIT,lot,price,slippage,price-sl*Point,price+tp*Point,comment,255,0,CLR_NONE);
} 

}


void DoSellLimit(double lot,double price,int slippage,int sl,int tp,string comment,int repeat){

for(int r=0;r<repeat;r++)
{
   int ticket;
   ticket=OrderSend(Symbol(),OP_SELLLIMIT,lot,price,slippage,price+sl*Point,price-tp*Point,comment,255,0,CLR_NONE);
} 

}

 

Usage :

// Buy Limit
DoBuyLimit(0.01,1.30000,3,300,600,"coba buy",2);

// Sell Limit
DoSellLimit(0.01,1.30000,3,300,600,"coba sell",2);


Good luck, do not forget to share and follow our official facebook and youtube, happy trading!






- Provided by HiLLzSoft Studio -