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
Using Max/Min as y values for a Trend Channel.
Collapse
X
-
Using Max/Min as y values for a Trend Channel.
I am in the process of making a custom indicator that uses the highest high and lowest low of the last n bars to make a horizontal channel. I have used Max/Min but the indicator does not plot. However when I use High or Low it does. Is there another way of finding the Max/Min of a certain number of bars?Tags: None
-
Hello VTrades,
Thank you for your reply.
When you use Max/Min in the indicator and it doesn't plot, do you see an error in the Control Center regarding the indicator when you try to apply it to the chart? Max/Min should not generally keep the indicator from plotting. If so, what is the full text of the error? Keep in mind that there need to be enough bars loaded on the chart before you use one of them to look back at bars, so you'd want to make sure you are checking that CurrentBar is greater than the lookback period before processing. You'd want to make sure you have something like this at the beginning of OnBarUpdate:
if (CurrentBar < n)
return;
Where n is the largest lookback period you're using.
Thanks in advance; I look forward to assisting you further.Kate W.NinjaTrader Customer Service
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,404 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
95 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
7 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
159 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
8 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment