Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
SMA High and Low lines not close of bar
Collapse
X
-
SMA High and Low lines not close of bar
The SMA that comes with NT 8 option is on bar close. I need a SMA that draws two lines, one line for the HIGH of previous bars and the other line for the LOW of previous bars. Would someone please help me with this? I have no experience with writing code. Thank you in advance! -
Hello Rancher,
Thanks for your post.
You could consider creating a NinjaScript indicator that draws a line at the High of the previous bar and the Low of the previous bar.
High[1] would be used to get the High price of the previous bar. Low[1] would be used to get the Low price of the previous bar.
Draw.Line() could be used to draw a line on a chart from a NinjaScript.
The C# programming language is used for developing NinjaScript indicators and strategies.
To create a NinjaScript indicator, open a New > NinjaScript Editor window, select the '+' tab at the bottom of the Editor window, select 'New Indicator'. Then, you could set up as much of the indicator as possible in the Indicator Builder. This will create the framework of the indicator or strategy
Once you finish setting up as much as possible in the Indicator Builder, you must manually program the rest of the indicator.
Below is a link to a forum post with helpful information about getting started with NinjaScript.
https://ninjatrader.com/support/foru...040#post786040
I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript:
https://ninjatrader.com/support/help..._resources.htm
If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of articles in our help guide first:
https://ninjatrader.com/support/help...g_concepts.htm
And the MSDN (Microsft Developers Network) C# Language Reference.
https://ninjatrader.com/support/help...erence_wip.htm
See the help guide documentation below for more information.
High PriceSeries: https://ninjatrader.com/support/helpGuides/nt8/high.htm
Low PriceSeries: https://ninjatrader.com/support/helpGuides/nt8/low.htm
Draw.Line(): https://ninjatrader.com/support/help.../draw_line.htm
If you need someone to write this script for you on your behalf, you can also contact a professional NinjaScript Consultant who would be eager to create this script at your request or assist you with your script.
You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more!
https://ninjatraderecosystem.com/sea...mming-services
Educators - https://ninjatraderecosystem.com/sea...ures=education
You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.
This NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
566 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
547 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
548 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment