OrderModify() question....(NOT wanting to set TP's and SL's)

Back to topics list To post a new topic, please log in or register
avatar
58
Mike.T 2016.06.12 00:41
 

Hi Guys...

I've tried to work this out searching the Forum but I can't seem to get a conclusive answer (and the markets are closed so I can't do any testing)....

My question is:

 

If I Modify a position (not a TP or SL).... but the Price ie. I want to set a new OrderOpen price...(for a current position)

1. I presume I can do that.... !=continue; (lol)

2.  Will MT4 cancel my "Old" position and then re-open a "New" position... (and bill me the Spread)   Or...

3. Will MT4 simply change my positions OrderOpenPrice with the "New" OrderOpenPrice.... (I'm thinking this is what will happen).... and then reflect the "Profit/Loss" of the "New" position...

 

Why do I want to know this? 

Well, I don't want to use "hard" Trailing Stops (Break-even, TP's or SL's).... I would simply like to change my position.... My EA can then re-calculate the profitability of the position.... 

 

Is this how OrderModify() works when not dealing with TP's and SL's...?

 

 Thanx....

 

 

avatar
1197
FMIC 2016.06.12 01:12 #
 
Mike.T:

I've tried to work this out searching the Forum but I can't seem to get a conclusive answer (and the markets are closed so I can't do any testing)....

My question is: If I Modify a position (not a TP or SL).... but the Price ie. I want to set a new OrderOpen price...(for a current position)

1. I presume I can do that.... !=continue; (lol)

2.  Will MT4 cancel my "Old" position and then re-open a "New" position... (and bill me the Spread)   Or...

3. Will MT4 simply change my positions OrderOpenPrice with the "New" OrderOpenPrice.... (I'm thinking this is what will happen).... and then reflect the "Profit/Loss" of the "New" position...

Why do I want to know this? Well, I don't want to use "hard" Trailing Stops (Break-even, TP's or SL's).... I would simply like to change my position.... My EA can then re-calculate the profitability of the position.... 

Is this how OrderModify() works when not dealing with TP's and SL's...?

You cannot change the Open Price of a currently open Market Order (that would be like "cheating"). You can only modify the Open Price (or Expiration) on Pending orders (that have not yet triggered and converted into market orders).

This is clearly stated in the documentation, so please read through it again. For Market Orders, all you can change with OrderModify() is the Stop-Loss and/or Take-Profit.

You can also partially or totally close the order with OrderClose(). So, the closest answer to your possibilities would be number 2, but you would have to do it explicitly (i.e. you would have to close the order and place a new one, thus losing out on the spread).

avatar
58
Mike.T 2016.06.12 02:22 #
 
FMIC:

You cannot change the Open Price of a currently open Market Order (that would be like "cheating"). You can only modify the Open Price (or Expiration) on Pending orders (that have not yet triggered and converted into market orders).

This is clearly stated in the documentation, so please read through it again. For Market Orders, all you can change with OrderModify() is the Stop-Loss and/or Take-Profit.

You can also partially or totally close the order with OrderClose(). So, the closest answer to your possibilities would be number 2, but you would have to do it explicitly (i.e. you would have to close the order and place a new one, thus losing out on the spread).

Thanx FMIC...

Thanx for the feedback... but...

I'm still not sure that I agree with you...

1. Why would there be any difference whether I set a "Hard" Stop (ie. TP or SL).... or change my "OrderOpenPrice"... because.... it amounts to the same thing...

2. If I look at my Break-even Function..... as price moves in my favour... then at (for arguments sake) my TP moves to "Break-even"..... 

 

Oh... ok.... (my BE would be a "hard" SL"....) so what you are saying is that  I cannot "Modify" my "Open" position's "OrderOpenPrice" position.... even though I will be happy to take on the new profit/loss parameters....

I guess that makes sense... unfortunately....

I'm trying to get my EA to work out my BE and TP Functions as a value and not just close the positions off... 


K, well.... back to the drawing board I guess...

 

Thanx 

 

avatar
1197
FMIC 2016.06.12 03:08 #
 

It is not a question of agreeing or not with me. It is a FACT, that you cannot change the Open Price of a Market order and I quote from the OrderModify() documentation:

Note

Open price and expiration time can be changed only for pending orders.

It also makes no sense that a moving your Stop-Loss would be equivalent to moving your Open Price. That is totally absurd!

avatar
Moderator
3404
GumRai 2016.06.12 03:08 #
 
Mike.T:

1. Why would there be any difference whether I set a "Hard" Stop (ie. TP or SL).... or change my "OrderOpenPrice"... because.... it amounts to the same thing...

 

OrderOpenPrice is the ENTRY price of an order. Once the order is opened, how can it be changed? If you go to a shop and buy something for 10$, then it cost 10$ and that's it.

TP and SL are possible EXIT price of an order

Back to topics list  

To add comments, please log in or register