I want it to, (Like it's doing now) to start a line at a cross and stay until there is another line opposite. And to have all the lines remain. Right now, they disappear once a new line starts.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
SineWave that draws S/R on the chart
Collapse
X
-
I was able to get the start of the line to draw once sine wave crossed but it's pointing straight down. Initially here, just trying to get line to go horizontal by any given # of bars like 5. Just to see that.
I want it to, (Like it's doing now) to start a line at a cross and stay until there is another line opposite. And to have all the lines remain. Right now, they disappear once a new line starts.
-
Hello trdninstyle,
To make a horizontal line you need to use the Line drawing object and then provide two prices that are the same price. For the bars ago you would need to specify at lest 1 bar, for example the start bar of 1 bars ago and the end bar of 0 bars ago. If you are trying to project a line into the future you could use a ray instead with the start bar of 1 bars ago and the end bar of 0 bars ago.
To have multiple drawing objects you need to edit the tag to include a variable like the CurrentBar so each object has a unique tag name. If you use the same tag it will just update the existing object.
Comment
-
Comment
-
-
Hello trdninstyle,
If you are referring to the background of that image that would be expected if your condition is becoming true frequently. By adding current bar that will allow your condition to draw an object each time it is true. To avoid that you would need to make a more refined condition that is true less frequently. If you remove Current bar from the tag that will prevent multiple objects but it will move the existing object to the new position once the condition is true.
Comment
-
My look back is only 10 days so thats a lot of crosses of the SineWave so, thats why this happened.
Instead of using the Ray draw tool I would like to use the Line and have it draw outward only until there is another Cross the other way but stay there. Then that new Line to stay current until the next cross.
The Start Bars Ago being 1 and End Bars Ago being 0, give me a real small line, not projecting out into the future. I did however get all of them to stay, did as you described. Instead of 1 for start bars ago, can I put minus -1?
Comment
-
Hello trdninstyle,
That would be possible however it would require using manual coding to have a variable start or end bars ago. In order to have a line keep extending until a certain point would require saving the CurrentBar at the time when the line starts and then using that to calculate how many bars ago from now that was so the line could be redrawn.
Negative barsago are technically not supported because that would point to a bar that has not happened yet. Depending on the number you enter that may or may not work.
Comment
-
I'll delve into manual coding tomorrow which I'm looking forward to, for right now I added another Action to draw Ray so I can use it in the morning trade.
Thank you, Jesse, my strategy looks very good. Should I start up a new work order or ticket and close this one?
Even though small, I can identify the areas where the crosses occurred & manually draw them in as needed.Last edited by trdninstyle; 12-28-2023, 04:45 PM.
Comment
-
Hello trdninstyle,
If you are going to start manually coding I would suggest to start a new post for that so we can exclude the prior information from the builder and help with your specific questions on that topic. If you wanted to continue using the builder and still have questions related to this script you could continue to post in this thread.
Comment
-
Il'' start a new post for the rest of it. This is so awesome! I didn't like having the label on top of the sine wave oscillator in the lower pane, so I unclicked the Plot on Chart box in the builder and instead placed a separate sinewave oscillator where I can remove the label.
There wasn't another way to remove the label from within the builder, was there? it's really a moot point I'm just curious.
Comment
-
-
Hello trdninstyle,
If you are going to make an indicator you can use the display name override to hide the name or customize it. https://ninjatrader.com/support/help...isplayname.htm
Comment
-
get { return "My Custom Display " + Name; } All I would have to do is {"" + Name;} to display no name at all? {"" + Name;} or {""} ?
(I'm about to send my new post, I just finished writing it.)
Thank you
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
669 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
378 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
111 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