Download MetaTrader 5
To add comments, please log in or register
Articles have already helped many traders. Come and read them!
Proximus
756
Proximus 2014.01.07 15:08 

Hi i`m wondering if i leave the takeprofit to 0 in the OrderSend() will be equivalent to a very high number where the price can never get?

So are they equivalent:

OrderSend(Symbol(),OP_BUY,0.01,NormalizeDouble(Ask,Digits),MAX_SLIPPAGE,0,0,"",magic,0,Blue);
OrderSend(Symbol(),OP_BUY,0.01,NormalizeDouble(Ask,Digits),MAX_SLIPPAGE,0,NormalizeDouble(Ask+(9999*Point),Digits),"",magic,0,Blue);

So logically because the price could never hit 9999 pips, they have to be equivalent, but i have the feeling they are not.

Suppose even if the second code gets executed, it puts a takeprofit which is visible in the terminal, but the first one doesnt.

I dont know, but suppose i put a buy order to trade, but if the takeprofit was set to 0, then can it happen that if the price goes under the order open price, and then it resumes its movement upwards, to hit the takeprofit at the orderopen price and exit the trade there, or its just my imagination, because although i didnt logged my past trades, its very tricky to the eye ?

Did any one of you guys experienced similar events?

Simon Gniadkowski
Moderator
17991
Simon Gniadkowski 2014.01.07 15:26  
Proximus:

Hi i`m wondering if i leave the takeprofit to 0 in the OrderSend() will be equivalent to a very high number where the price can never get?

If you set the TakeProfit to 0.0 then there is no Take Profit level set . . . the only way a Buy or Sell Order with no TP set will close is by one of the following: Stoploss if set, calling OrderClose(), OrderCloseBy(), manually closing it or Margin Call. It cannot be closed by Take Profit when one is not set.
Tjipke de Vries
6297
Tjipke de Vries 2014.01.07 16:22  
Proximus:
OrderSend(Symbol(),OP_BUY,0.01,NormalizeDouble(Ask,Digits),MAX_SLIPPAGE,0,NormalizeDouble(Ask+(9999*Point),Digits),"",magic,0,Blue);

So logically because the price could never hit 9999 pips, they have to be equivalent, but i have the feeling they are not.

Something more

you say 9999 pips, i don't see it

it is according to me 9999 Point

Point / Pips isn't the same

whroeder1
14218
whroeder1 2014.01.07 16:24  
Proximus: Hi i`m wondering if i leave the takeprofit to 0 in the OrderSend() will be equivalent to a very high number where the price can never get?

I dont know, but suppose i put a buy order to trade, but if the takeprofit was set to 0, then can it happen that if the price goes under the order open price, and then it resumes its movement upwards, to hit the takeprofit at the orderopen price and exit the trade there, or its just my imagination, because although i didnt logged my past trades, its very tricky to the eye ?
  1. No TP (0) is equivalent to a very high number for a buy, very low (<=0) for a sell.
  2. No TP is NONE, not OOP.
Proximus
756
Proximus 2014.01.08 10:25  
Ok thanks for clearing it up.
/
To add comments, please log in or register