LinearReg=LinReg(Highs[1],Length)[0];
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
Indicators on Multi Time Frame
Collapse
X
-
Indicators on Multi Time Frame
I cannot seem to get this working properly. I am calculating an indicator off of the highs/lows of a second data series. I am using the following code...
Code:Tags: None
-
I've done that and no joy. I noticed something interesting. The following code gives me a plot, but has a 1 bar lag.
Code:If (BarsInProgress==1) LinearReg=LinReg(High,Length); StrategyPlot(0).Value.Set(LinearReg)
Code:If (BarsInProgress==1) { LinearReg=LinReg(High,Length); StrategyPlot(0).Value.Set(LinearReg) }
Comment
-
Remember that StrategyPlot is provided with limited functionality. This may be one of its limitations.
I am surprised that this worked for you though: LinearReg=LinReg(High,Length);
I would suspect LinearReg to be a double and that you would need to actually set a value to it instead of a DataSeries. If you are using them as DataSeries maybe try changing it to double and doing LinearReg=LinReg(High,Length)[0]; and then set it to the StrategyPlot that way.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Zeezee, Today, 12:45 PM
|
1 response
4 views
0 likes
|
Last Post Today, 12:54 PM | ||
Started by tomasak, Today, 12:54 PM
|
0 responses
1 view
0 likes
|
Last Post
by tomasak
Today, 12:54 PM
|
||
Started by swjake, Today, 12:04 PM
|
2 responses
9 views
0 likes
|
Last Post
by swjake
Today, 12:42 PM
|
||
Started by Richozzy38, Yesterday, 01:06 PM
|
5 responses
24 views
0 likes
|
Last Post
by Richozzy38
Today, 12:41 PM
|
||
Started by tradingnasdaqprueba, 05-07-2024, 03:42 AM
|
13 responses
52 views
0 likes
|
Last Post Today, 12:35 PM |
Comment