Start 1 - Open Trade at Specific Price with iCustom

 

Hello,

I am a php programmer and new to mql4. I am making an ea that uses alert of an indicator to open trade.

Check below code of indicator that prompts alert....


PlaySound("alert.wav");

if (gi_112 == 1) MessageBox("Entry point: buy at " + l_price_20 + "!!", "Entry Point", 0);

      else

if (gi_112 == 2) MessageBox("Entry point: sell at " + l_price_20 + "!!", "Entry Point", 0);

      li_16 = FALSE;


Code of ea that opens trade is.....

  double gi_112 = iCustom(NULL,0,"TradeFxTurbo",0,0);

if (gi_112 == 1){

int ticket=OrderSend(NULL,OP_BUY,Lots,Ask,slippage,SL,TakeProfit);

}

if (gi_112 == 2){

   int ticket=OrderSend(NULL,OP_SELL,Lots,Ask,slippage,SL,TakeProfit);

}  

return(0);


Because this indicator produces alert after long time i am finding it difficult to check it. So, best way is to ask expert coders for sure way.

My questions are....

>> will this ea open trade when gi_112 = 1 or 2 in indicator?

>> How to open pending order at "l_price_20" price?

Thanks in advance.
 

look line Koharmoni variable :))

 
@alirezaDavid: i did not understand.
 
Looks like decompiled code to me
 
kpmr: Code of ea that opens trade is.....

Ask the owner of the source code to give it to you or have him convert it for you.

Decompiled code is stolen code. Either you are a thief, a fence, or the receiver of stolen (intellectual) property. Either way we will not be an accomplice after the fact to theft. See also https://www.mql5.com/en/forum/134317

If you post decompiled code again, you will likely be banned and Mt4 doesn't allow compilation of decompiled code any more.