Brackets for strategy entry

MrRegulator

New member
Joined
Aug 9, 2021
Posts
2
Likes
0
I'm at my wits end. I can not seem to get simple brackets on an order placed from a strategy. It's a simple ema crossing strategy. I'm just testing whether I can get stop loss and take profits set for a specific amount of ticks. I've got the interface working well. I can enter the ticks I'd like but the onOrderFilled() never populates my brackets. If I click the little paperclip to attach a bracket, that works. If anyone has a bit of code that works for them. I've gone through the Trade Manager code and have tried just about every permutation I can think of to get it to work. Any assistance would be greatly appreciated.
 

Bryan SP

Member
Joined
Aug 5, 2021
Posts
9
Likes
5
I was never able to get this working either. I instead use my current position and check the current price onbarupdate and using market orders for stops and take profits.
 

MrRegulator

New member
Joined
Aug 9, 2021
Posts
2
Likes
0
My only issue with onbarupdate is that it has to wait for the bar to update before putting in stop loss and take profits. Sometimes my targets for both are in one bar. And they are missed because of it. I really wish they'd make it easier to attach brackets to orders. I can easily place market orders or limit orders. All that needs to be done is allow for stop loss and take profit placement with the same order.
 
Top