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
Define Slope of EMA(20)
Collapse
X
-
Originally posted by arbuthnot View PostCode:private [B]DataSeries (absSlopeMACD)[/B]; private override void [B]OnStartUp()[/B] { ... absSlopeAverage = SMA(absSlopeMACD, normPeriod); }
I've been fascinated to read this thread, as much for the approaches to coding as for the ideas about 'slope'.
I have a couple of questions, if you have a spare moment, about the coding you've used.
I notice that you define the data series by
Code:private DataSeries (absSlopeMACD);
In Variables (without parentheses):
Code:private DataSeries testseries;
Code:testseries = new DataSeries(this);
Moreover, I'd appreciate it if you could explain in a few words what the OnStartUp method does and how it differs from OnBarUpdate. I've seen this only once or twice in indicators and have never really grasped its purpose.
Thanks very much in advance.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Max238, Today, 01:28 AM
|
5 responses
41 views
0 likes
|
Last Post
by Max238
Today, 08:30 AM
|
||
Started by giulyko00, Yesterday, 12:03 PM
|
3 responses
12 views
0 likes
|
Last Post Today, 08:26 AM | ||
Started by habeebft, Today, 07:27 AM
|
1 response
14 views
0 likes
|
Last Post Today, 08:08 AM | ||
Hi
by AveryFlynn
Started by AveryFlynn, Today, 04:57 AM
|
1 response
12 views
0 likes
|
Last Post Today, 07:57 AM | ||
Started by r68cervera, Today, 05:29 AM
|
1 response
10 views
0 likes
|
Last Post Today, 07:47 AM |
Comment