Need help determining where and how to declare the variables for this chop indicator code. I am having trouble figuring this out from the NT help guide. Code calculation below :
double ChopIndicator = ((100 * Log10 (sum(atr(1),14)/maxhi(14)- minlo(14)))/log10(14));
Does this go in the variable section, the onbarupdate section, both or neither ? Would all these be double types also ?
After they are defined can I call them with :
This post has been selected as an answer to the original posters question
Probably the easiest way for you to learn would be to examine the code of the NinjaTrader SMA indicator. You will see a region called variables which is where most variables would be declared. To plot your indicator you will need to add a "Plot". Looking at the SMA you will see where calculations are made with the output to "Value" using .Set.
So understand that creating a plot associates automatically with Value.
You might look a few simple NinjaTrader indicators to get a better idea. Be careful not to get into the most complicated or you will risk certain insanity.
"Money is better than poverty, if only for financial reasons." - Woody Allen
The following user says Thank You to Tasker_182 for this post: