OrderSend() Function does not display a color sign on the chart

 

Dear Friends,

in my EA I am using this command:

order_ticket = OrderSend(symbol_to_trade, trade_direction, order_size_in_lots, price, Slippage, StopLoss, ProfitTarget, order_comment, MAGIC_NUMBER, 0, order_color);

I was expecting that after placing the order there would be a Green or Red arrow marking the price where the order was placed. It does not work, though. How can I make it "behave"?

Thank youv very much! Solator

 
One beginner to another... Think about this, "If parameter is missing or has CLR_NONE value opening arrow is not drawn on the chart." Are you sure of your value order_color?
 
MisterDog:
One beginner to another... Think about this, "If parameter is missing or has CLR_NONE value opening arrow is not drawn on the chart." Are you sure of your value order_color?


Hello, yes, the order_color is set to Green or Red:

if (trade_direction == OP_BUY)

{

order_color = Green;

price = Ask;

}

else

{

order_color = Red;

price = Bid;

}

OrderSend(..........., order_color);

etc.

Thank you! Solator

 
solator:
order_ticket = OrderSend(symbol_to_trade, trade_direction, order_size_in_lots, price, Slippage, StopLoss, ProfitTarget, order_comment, MAGIC_NUMBER, 0, order_color);
  1. Don't double post.
  2. Did you test the return code to see if it opened an order?
  3. Did you adjust for 4/5 digit brokers.
  4. You didn't adjust for ECN brokers.
  5. I believe the open/close arrows and the line in between is done by the tester.
 
WHRoeder:
  1. Don't double post.
  2. Did you test the return code to see if it opened an order?
  3. Did you adjust for 4/5 digit brokers.
  4. You didn't adjust for ECN brokers.
  5. I believe the open/close arrows and the line in between is done by the tester.

Hello, thank you! The order was opened, yes. I do not know what it requires to adjust for an ECN broker. And do you mean that the arrows are shown only in the strategy tester but not during live trading? Thanks!! Solator
Reason: