Thanks for any help!
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
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
Paul H.NinjaTrader Customer Service
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.
Paul H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by f.saeidi, Today, 07:07 AM
|
6 responses
19 views
0 likes
|
Last Post
by f.saeidi
Today, 03:31 PM
|
||
Started by cmtjoancolmenero, Today, 02:31 PM
|
6 responses
15 views
0 likes
|
Last Post Today, 03:29 PM | ||
Started by Graci117, Yesterday, 11:40 PM
|
5 responses
26 views
0 likes
|
Last Post Today, 03:29 PM | ||
Started by rene69851, Today, 03:25 PM
|
0 responses
3 views
0 likes
|
Last Post
by rene69851
Today, 03:25 PM
|
||
Started by Irukandji, Yesterday, 05:50 AM
|
3 responses
9 views
0 likes
|
Last Post Today, 03:25 PM |
Comment