Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Cancel Order on ATM Strategy
Collapse
X
-
Originally posted by NinjaTrader_Austin View PostMrTicks, thanks a bunch. This will be a great learning tool.
I can upload to the 6.5 section but I created this on version 7.0.0.19.
Comment
-
Mr Ticks,
Thanks for posting the CANCEL code.
I'm continuing to look at this for things you've mentioned regarding placing a Buy and Sell order at the same time or not stacking orders. I understand these could be resolved with bool flags to keep you in one direction or one trade only at a time.
Another advancement of your code could be a CHANGE code.
I'm looking at some code I was previously attempting to alter the entry order in a "chase" type mode. ie if the order is not filled within the first 2 bars after pending entry, use the AtmStrategyChangeEntryOrder to adjust to a new orderPrice:
Code:double changedOrderPrice = //set new order price level... [SIZE=2]AtmStrategyChangeEntryOrder(changedOrderPrice,0,orderId); [/SIZE]
Thanks for sharing your continuing progress.
Kirk
Comment
-
Originally posted by zeller4 View PostMr Ticks,
Thanks for posting the CANCEL code.
I'm continuing to look at this for things you've mentioned regarding placing a Buy and Sell order at the same time or not stacking orders. I understand these could be resolved with bool flags to keep you in one direction or one trade only at a time.
Another advancement of your code could be a CHANGE code.
I'm looking at some code I was previously attempting to alter the entry order in a "chase" type mode. ie if the order is not filled within the first 2 bars after pending entry, use the AtmStrategyChangeEntryOrder to adjust to a new orderPrice:
Code:double changedOrderPrice = //set new order price level... [SIZE=2]AtmStrategyChangeEntryOrder(changedOrderPrice,0,orderId); [/SIZE]
Thanks for sharing your continuing progress.
Kirk
My next project is to look at only having one position on per instrument at a time. My strats have buy/sell signals combined in them but would like to work on getting the code for only one trade at a time also as I end up getting stopped out of good positions and then there are two stop loss orders left open that I have to manually cancel.
Comment
-
Mr Ticks and other ATMStrategy users/coders,
Here is my latest attempt to use ATMStrategy template. I've started with your CANCEL code and added the CLOSE and CHANGE elements. Also, I've got a text box for the current trade status and DrawRays for emulating the ChartTrader.
Please try it out and see if there's other things that could be tweaked/modified or totally rewritten. The results might not be profitable at this stage because I'm really just checking the functionality of the components.
If some graphics don't disappear when they're supposed to, I think adding some "RemoveDrawObjects()" could be added to the code.
If you're using v7.20 like I am, I'd be curious to hear of your results.
Thanks,
Kirk
Comment
-
the NEW "latest"
Mr. Ticks,
I've got a newer version which I've been tweaking all day.
Please let me know if you have any changes/tweaks that will improve the code. FWIW, I'm still sorting out my own personal "secret sauce" entry criteria. This code more or less shows functionality of ATM strategies but isn't necessarily profitable.
Hope you can benefit from the code.
Kirk
Comment
-
Originally posted by zeller4 View PostMr. Ticks,
I've got a newer version which I've been tweaking all day.
Please let me know if you have any changes/tweaks that will improve the code. FWIW, I'm still sorting out my own personal "secret sauce" entry criteria. This code more or less shows functionality of ATM strategies but isn't necessarily profitable.
Hope you can benefit from the code.
Kirk
I'll hopefully get to test code later on. If not, it'll be after the weekend before I get to try it out.
Feel free to share the "secret sauce"!
Gavin.
Comment
-
nice !
small questions,
when I came upon this tread I though to myself I found the holly grail ! seriously ! I have been trying to do this for a long time ! and bam done! Thank you !
but my questions was , what advantage doe doing a Atm strategy instrad of just if (bla bla bla) , buylimit , set a profit target, and loss, and use cancelorder() in onorderstatus() when the price would increase or drop , away from your order? this is what I was trying to do, and I will probably switch to Atm , but I figured I would ask.
JP
Comment
-
Originally posted by chancehero View Postsmall questions,
when I came upon this tread I though to myself I found the holly grail ! seriously ! I have been trying to do this for a long time ! and bam done! Thank you !
but my questions was , what advantage doe doing a Atm strategy instrad of just if (bla bla bla) , buylimit , set a profit target, and loss, and use cancelorder() in onorderstatus() when the price would increase or drop , away from your order? this is what I was trying to do, and I will probably switch to Atm , but I figured I would ask.
JP
Comment
-
Help please
Anybody could tell where is the root folder of ATM strategy template that are built in the SuperDom? Please help.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by trilliantrader, Yesterday, 03:01 PM
|
3 responses
30 views
0 likes
|
Last Post Today, 08:28 AM | ||
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
4 responses
26 views
0 likes
|
Last Post Today, 08:19 AM | ||
Started by Brevo, Today, 01:45 AM
|
1 response
14 views
0 likes
|
Last Post Today, 08:14 AM | ||
Started by rjbtrade1, 11-30-2023, 04:38 PM
|
2 responses
74 views
0 likes
|
Last Post
by DavidHP
Today, 08:12 AM
|
||
Started by suroot, 04-10-2017, 02:18 AM
|
5 responses
3,022 views
0 likes
|
Last Post Today, 08:11 AM |
Comment