Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Im a little stuck here. If I enter an order with an ATM strategy, then what object do I need to instantiate so that I can retrieve the stop and target levels?
So far I have managed to get VS hooked into Ninja.
Successfully get it to stop in debug mode at OnExecutionUpdate()
However I dont know what object array is carrying the information I need.
Thanks
Can you help answer these questions from other members on NexusFi?
I think it would be something like this, I havent tested it thought my brain is starting to hurt. Will try this weekend. rleplae does it look right to you?
Order stopOrder;
double _pricestop = stopOrder.StopPrice
Im not sure what youve done there. Youre setting an order object to a string value?
Basically what I want to do is:
1. Create an event handler on executionupdate (or if there is a better way)
2. When the event is fired, instantiate an order object and retrieve the stop and limit levels.
My question is how do I get the current order object and what if its being managed by an atm strategy?
1) If you put on the ATM strat then don't you know the stop and target levels?
2) It seams like most people use a ninjascript to enter a position and then (maybe) use an ATM strat as and exit.....it sounds like you want to do the opposite? (not that is wrong...just trying to understand).
3) I have never used and ATM stratagy ever before so I have never used them in an NT script. I am an approved NinjaTrader EcoSystem Partner so I can probably get an answer for you if I understand better.
So in NT8 the order info is stored in an order object. So you can define your own order object like I showed before: private Order myOrder1;
then if you use ninjasript to place a trade then you would do something like this: myOrder1 = "Place your Trade";
then the Order Object myOrder1 will point to that order so you can access it in your program. When I place stop orders in a NT script i always tell NT what the stop price should be....so I really never need to access myOrder1.StopPrice because i already know what i set it to in the first place.
Maybe if your ok with telling us what you are trying to do I/we can point you in the right direction. Or pm me if you need to make it private.
Hi Marpol,
Sorry Im not being very clear with what I am trying to achieve.
This is my first programming in a while so Im starting with something simple to get my head back into it.
At the moment, I do a screenshot after every trade has completed. I mark what my trade parameters were by drawing the entry, stop and target levels with a line. This helps my post analysis.
I want to speed up this process by automating the lines on the chart (with text showing the stop amount and target amount), so that when the trade is over all I have to do is quickly type in a brief analysis and then save the chart.
I really just need to get those levels and then my next step is figuring out how to draw a line on the chart at those levels.