Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Is it possible to have finer control over an order submitted via AtmStrategyCreate()?
Collapse
X
-
ChelseaB - that is not the result I got from some tests I did and I welcome you to see for yourself by using the sampleAtmStrategy you created on two charts with slightly different intervals (so that there is overlap between their order placement and cancellation) and using the same account and instrument. In this scenario, I found AtmStrategyClose() executed on the strategy of one chart affected the orders of the strategy on the other chart.
-
Originally posted by mbesha View PostChelseaB - that is not the result I got from some tests I did and I welcome you to see for yourself by using the sampleAtmStrategy you created on two charts with slightly different intervals (so that there is overlap between their order placement and cancellation) and using the same account and instrument. In this scenario, I found AtmStrategyClose() executed on the strategy of one chart affected the orders of the strategy on the other chart.Last edited by bltdavid; 01-30-2020, 10:52 PM.
Comment
-
Originally posted by NinjaTrader_ChelseaB View PostHello mbesha,
The AtmStrategyClose() will close a strategy by ID. This is ID is generated by GetAtmStrategyUniqueId(). This ID will be unique each time its called. For each chart running the script, a different ID is going to be used so the NinjaScript Strategy will only be closing the Atm Strategy created with that ID.
must be different than the ATM strategy template name supplied to AtmStrategyCreate in the NinjaScript.
Yes, I just reviewed your video again -- you have created two different ATM strategy templates -- one you
used inside the NinjaScript strategy and the other you used for your manual trades -- it seems like
it was very important to have two separate ATM strategy templates -- is that takeaway correct?
But your comment above seems to imply the ATM strategy template name doesn't matter, it is the
uniqueness of the string returned by GetAtmStrategyUniqueId() that keeps everything working properly.
Is that right? I feel like there is a disconnect here.
I think the missing piece for me is 1) the ATM strategy template name used with AtmStrategyCreate must
be different than the ATM strategy template name employed for manual trading, and 2) each NinjaScript
strategy calling AtmStrategyCreate must use a different ATM strategy template name.
Is #2 necessary?
Chelsea, your video does not address #2.
What I mean is,
What if two instances of the @SampleAtmStrategy strategy -- sure, both call GetAtmStrategyUniqueId but
they also both use the same ATM strategy template name in AtmStrategyCreate -- what happens when two
instances of this same strategy using the same ATM template execute simultaneously but on different
charts?
mbesha, is that what you're doing?
[Beg pardon that I am refereeing this thread so much, but I am keenly interested in this issue as well.]Last edited by bltdavid; 01-30-2020, 10:54 PM.
Comment
-
Originally posted by bltdavid View Post
What I mean is,
What if two instances of the @SampleAtmStrategy strategy -- sure, both call GetAtmStrategyUniqueId but
they also both use the same ATM strategy template name in AtmStrategyCreate -- what happens when two
instances of this same strategy using the same ATM template execute simultaneously but on different
charts?
mbesha, is that what you're doing?
Comment
-
Hello mbesha,
I am not able to reproduce this behavior.
Below is a link to a video that shows two instances of the strategy running on different intervals without using charts, and when the two instances are running on different charts. The behavior is always the same. AtmStrategyClose() will only close the strategy that has the id provided and each strategy is generating a new id.
Please send an email to platformsupport [at] ninjatrader [dot] com so that I may perform this exact same test on your end to ensure the behavior is the same.
Chelsea B.NinjaTrader Customer Service
Comment
-
Hello bltdavid,
There has not been resolution at this time.
Are you also having an issue? If you perform the same test I've shown in the video are you experiencing different behavior?
mbesha,
I have not seen any emails in our platform support ticketing system with a link to this forum thread.
May I confirm that you have sent an email to platformsupport [at] ninjatrader [dot] com?Chelsea B.NinjaTrader Customer Service
Comment
-
Nope, no issues here -- I'm ok -- years ago, as a wee lad (aka novice NinjaScript programmer), I thought
I had some issues, but never pursued the problem. I wanted to move to Unmanaged anyways, so now I
have a gap in my knowledge of using Atm Strategies in NinjaScript. This thread reminded me of that gap
and I became interested.
Anyways, your excellent videos showed some simple test cases that have convinced me everything should
work as I expect.
I had some suspicions that maybe mbesha was following in my tracks, but I don't remember what my own
tracks were at the time .
I'm hoping mbesha keeps in touch and updates this thread with the resolution to his problem.
Comment
-
- Thanks for the time and effort in making the video and it does seem that there is no cross-over effect from the test you conducted. I got a similar result when I did some testing on my end as well. I guess that settles it for AtmStrategyClose().
@bitdavid - thanks for your input.
- Likes 1
Comment
-
Hi bitdavid
I haven't gotten to the bottom of the unexpected behavior and may not get around to doing so as I have already made the switch to a managed approach as I previously mentioned I would be doing. If others do come across any issues, they'd have to pick it up from where I've left off unfortunately.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Padan, Today, 02:02 AM
|
0 responses
6 views
0 likes
|
Last Post
by Padan
Today, 02:02 AM
|
||
Started by bukowa, 11-09-2023, 06:07 PM
|
20 responses
406 views
0 likes
|
Last Post
by Adfra
Today, 01:36 AM
|
||
Started by yertle, Yesterday, 05:49 PM
|
2 responses
11 views
0 likes
|
Last Post
by yertle
Today, 12:12 AM
|
||
Started by kaywai, Today, 12:06 AM
|
0 responses
9 views
0 likes
|
Last Post
by kaywai
Today, 12:06 AM
|
||
Started by kaywai, 03-25-2024, 10:04 PM
|
3 responses
37 views
0 likes
|
Last Post
by kaywai
Yesterday, 11:57 PM
|
Comment