can't trade gold with OrderSend()

 

hi, this is my first program. I want to make a order on Gold symbol by using OrderSend() function on mt4.

I try but when i running on my test. It's always show me EURUSD symbol on my teminal not Gold symbol.

I hope there's someone show me how to i can make order with gold when i compile my demo code.

 Tks so much.

 //////////////////////

int start()

  {

   double TakeProfitLevel;

   double StopLossLevel;

 

   TakeProfitLevel = Bid + TakeProfit*Point;   //0.0001

   StopLossLevel = Bid - StopLoss*Point;

  

   Alert("TakeProfitLevel = ", TakeProfitLevel);

   Alert("StopLossLevel = ", StopLossLevel);

   OrderSend(Symbol(), OP_BUY, 1.0, Ask, 10, StopLossLevel, TakeProfitLevel, "My 1st Order!");

   return(0);

  } 

/////////////////// 

 
Attach the EA to a gold chart.
 
it's easy. Tks bro so much. 
 
GumRai:
Attach the EA to a gold chart.
Alexmql4:
it's easy. Tks bro so much. 

But it's seem not running. I can see EA on my terminal affter attach it. But i can't it do anything on my code (ex: Aleart ). Can you guide me.

 

Tks u. 

 
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. TakeProfitLevel = Bid + TakeProfit*Point;   //0.0001
    StopLossLevel = Bid - StopLoss*Point;
    Stops must be adjusted to TickSize
    Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it. It's use is always wrong