Jump to content
Medved Trader Forums

Saved order


Niko

Recommended Posts

You cannot do that for several reasons.

1. Limit order is definitely not guaranteed to fill in 5 seconds (which is the delay you set)...

and

2. Even if it did, the variables that are used in the hotkey are set at the beginning of the whole hotkey, and are not recalculated at the beginning of each section. So if you have no position at the start of the hotkey, the PosAbs will be 0 even if the first section executes an order and a position appears.

What you would have to do is calculate the quantity and make it a variable in the variable section at the very start of the hotkey. Then use that variable in the subsequent sections. Same for the Paid price. And still have to take the (1) fact above into account.

Link to comment
Share on other sites

Thank you Mike.

I'm trading multiple instruments so I won't be able to know and set in advance quantities.

Just to make sure, there's no way at all to set 1 hotkey who will do the following :

- Buy limit x% of account

- Set 1SL and 1TP(half of position) at x% of entry

- Set 1SL and 1TP(the other half) at y% of entry

?

 

Link to comment
Share on other sites

If instead of "Buy limit x% of account" you'd accept "Buy market x% of account" and then assume that it was bought at current Ask (for the "entry" part of the subsequent orders) - yes you can.

Or - if you split it in two. One hotkey would do the "Buy limit x% of account". And the other (that you would execute once you see the buy go through) would set up the other two OCO orders.

Link to comment
Share on other sites


Mike - in your last example, is it not necessary to specify Quantity in each of the Sell bracket legs? 

Nico - which broker are you using? 

The benefit of Mike's proposed OTOCA solution is that the broker will be able to associate buy and sell orders as belonging to the same order. Your broker can then make placement of OTOCA Sell orders conditional on a complete fill of your OTOCA Buy order. I don't think MT Saved Orders can do that - they will send separate Buy and Sell orders -from the POV of the broker, these are not linked so theoretically they can fill separately.

Btw - I am using the same approach as Mike described and it works well for me..

 

Edited by Hans
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...