Np2112 Posted February 27, 2023 Report Share Posted February 27, 2023 Hi - I am currently using hotkeys to trim position/take profits along the way, the logic is as soon as 1st trim is executed, remaining position qnty should move to breakeven. Getting an error with quantity i.e only the qnty of position that was executed on trim moves up to breakeven, Below is current formula, What should be changed to move the entire remaining qnty to B/E? Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted February 27, 2023 Report Share Posted February 27, 2023 First, you have an OTA order with 2 different quantities in the legs. I am pretty sure we don't allow for it. Second - your "triggered" order has Pos as the quantity. You probably think that the Pos includes the amount that was bought on the first leg. But the Pos is taken from the account positions *at the time* of the hotkey execution. Quote Link to comment Share on other sites More sharing options...
Np2112 Posted February 27, 2023 Author Report Share Posted February 27, 2023 Thanks Mike, is there is a workaround for what i am trying to do then inside of 1 hotkey? worst case, i can just not use a conditional order and use 2 keystokes to execute, 1st to trim and 2nd to move pos to b/e. Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted February 27, 2023 Report Share Posted February 27, 2023 3 minutes ago, Np2112 said: Thanks Mike, is there is a workaround for what i am trying to do then inside of 1 hotkey? worst case, i can just not use a conditional order and use 2 keystokes to execute, 1st to trim and 2nd to move pos to b/e. You can execute two or more orders in one hotkey... Each one independent of the other? Quote Link to comment Share on other sites More sharing options...
Np2112 Posted February 27, 2023 Author Report Share Posted February 27, 2023 Yes, I had tried doing that with Fidelity earlier, but sometimes the stop order would get executed before, while the trim order was still waiting to be filled, this creates error stop qnty would be more than position held. Hence was looking at OTA orders. Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted February 27, 2023 Report Share Posted February 27, 2023 2 minutes ago, Np2112 said: Yes, I had tried doing that with Fidelity earlier, but sometimes the stop order would get executed before, while the trim order was still waiting to be filled, this creates error stop qnty would be more than position held. Hence was looking at OTA orders. Right. Try a Delay inbetween. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.