michaelphines
Member
- Joined
- Apr 21, 2020
- Posts
- 7
- Likes
- 2
Hey there,
I've got my assisted strategy set up in a really good place such that I can activate it when I see a trade setting up and get my perfect rule-based entry. Now I'm at the point where I just need to have it apply my bracket, but I can't figure out how to execute an OCO. Is it possible? Right now I can attach my bracket to the executed position manually, but that's not ideal, because I'd like to have the SL and TP set based on the strategy as well. Ideally I could set a stop triggers OCO, but I would settle for just the OCO.
If it's not possible, I'm torn between getting a good exit with a limit order (important because it's a scalping strategy) or protecting myself with a stop loss. Obviously I can execute both trades, and wait until one is filled and cancel the other client-side, but my fear is that I'll have an internet outage while I'm in a position and my TP will trigger and then immediately reverse and run out my stop before I can get logged back in, leaving me in the inverse position.
The resources I've been using are: https://www.motivewave.com/sdk/MotiveWave_SDK_Programming_Guide.pdf
the javadoc: https://www.motivewave.com/sdk/javadoc/index.html
and the example projects: https://www.motivewave.com/sdk/MotiveWave_Studies.zip
The sample projects were great for getting started, but some code for a more complex strategy might be helpful. I don't know if the Trade Manager strategy uses OCOs, but it also has some features that I'm struggling to find documentation for, like showing the Risk/Reward in the strategy screen.
Cheers,
Mike
I've got my assisted strategy set up in a really good place such that I can activate it when I see a trade setting up and get my perfect rule-based entry. Now I'm at the point where I just need to have it apply my bracket, but I can't figure out how to execute an OCO. Is it possible? Right now I can attach my bracket to the executed position manually, but that's not ideal, because I'd like to have the SL and TP set based on the strategy as well. Ideally I could set a stop triggers OCO, but I would settle for just the OCO.
If it's not possible, I'm torn between getting a good exit with a limit order (important because it's a scalping strategy) or protecting myself with a stop loss. Obviously I can execute both trades, and wait until one is filled and cancel the other client-side, but my fear is that I'll have an internet outage while I'm in a position and my TP will trigger and then immediately reverse and run out my stop before I can get logged back in, leaving me in the inverse position.
The resources I've been using are: https://www.motivewave.com/sdk/MotiveWave_SDK_Programming_Guide.pdf
the javadoc: https://www.motivewave.com/sdk/javadoc/index.html
and the example projects: https://www.motivewave.com/sdk/MotiveWave_Studies.zip
The sample projects were great for getting started, but some code for a more complex strategy might be helpful. I don't know if the Trade Manager strategy uses OCOs, but it also has some features that I'm struggling to find documentation for, like showing the Risk/Reward in the strategy screen.
Cheers,
Mike