Thanks for any help!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Looking for help on igh/low plots
Collapse
X
-
Looking for help on igh/low plots
I need to get a plot to go on the low of a bar when it closes higher then previous bar and high of bar when it closes below the low of previous bar.
Thanks for any help!Tags: None
-
Something like:
double DesiredValue = (Close[2]> Close[1] Myplot = Low[2]
Then
= Close[2]<Close[1] Myplot High[2}
-
Thanks for the help PaulH.
I use to code in NT7 yeas ago but am a bit lost now in NT8 and rusty.
Mainly need help with how to program the actual plot. I have the Addplot "Myplot" set up, but not sure the command I need to use.
Comment
-
Hello reedstickets,
Thanks for your post.
I'm not sure but it looks like out posts got out of sequence!
I would suggest using the Ninjascript wizard to create the indicator structure that you need. With the wizard you would supply any inputs needed as well as any plots. By default a plot is has a "Plotstyle" of line type however you can change the plot style to a number of other markers suchas dots, blocks, squares and triangles. The wizard will complete all of the structure for you so all you would need would be to add the OnBarUpDate() logic needed.
An example of the code would be something like:
if (Close[2] > Close[1])
{
myPlot[0] = Low[2];
}
Here is a link to the Ninjascript wizard: https://ninjatrader.com/support/help...?ns_wizard.htm
Comment
-
Thanks for the help,
I got it plotting but my logic is messed up. Is there a way to have the plot:
If (Close[1] > Close[0])
But then a condition for if the close does not close higher then the previous bar [1] or close lower then the Low[1] to not plot a new plot until one of those two events occur?
Thanks for any help, I really need this for my trading.
Comment
-
Hello reedstickets,
Thanks for your reply.
I'm a bit confused by what you are writing.Could you restate for clarity or provide a screenshot of the condition(s) you are looking for?
In terms of syntax, in C# the double ampersand && means a logic "And". The double pips || would be the C# logic "Or".
if (condition_A && (Condition_B || Condition_C))
{
// Do something
}
In the above the code would "Do something" only if A+ B is true, or if A + C is true.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
666 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
377 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
110 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
575 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
580 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment