I'm not a ZN trader, so I may be confused, but... the EMA is computed on the Close[x]... so however ninja presents Close[x] to you is the same units your resulting ema is in. They should be directly comparable in code, even if ninja does some formatting to plot price as xxx'yyy on your Y axis. If Close[x] is pre-formatted in the xxx'yyy sense, then your EMA would be bogus because it doesn't take that into account. But I doubt ninja would do that, for that reason.
Again, as I don't trade ZN there may be some detail that escapes me, but on general principle that should be how things are.
The following user says Thank You to Richard for this post:
thanks for input!
dont know - havnt tried it yet.
i am a bit confused with these ZN-values - also not familliar ZN
- so i wanted to convert it first + then do my codings with the values - maybe one step too much .... hm .. i will test it.
Hi to Richard again,
i tested some things on the WE and you are absoutly right !
it s not important in which value-format the EMA is shown in the chart - ninja realizes the corect comparable of EMA + ZN value at Close[x] !
Great - so the whole translation-idea is senseless - except of if you want to plot the values in text-format.
But in strategys it is not necessary at all.
An ENTRY after the Bar closes Above / Below EMA 50 works fine.
well - learned some things in coding with that.
learned more on basicly understanding ninjatrader + processing - also not bad The journey is the reward.
If you want to Print() anything it will be important. There is also a particular closed-source script I have that requires it due to the way it calculates some math... so, 99% agree with you but 1% is important.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
Yeah, for printing I imagine the code samples earlier in the thread will suffice. If there are libraries that expect a translated double, then for efficiency's sake I'd suggest using a method that doesn't go double -> string -> double. Lots of memory allocation in that path, that can surely be avoided by staying in number space.