Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Add horizontal lines to indicator in strategy script
Collapse
X
-
Hello alexstox,
Draw objects can be used in both Indicator and Strategies. They do use a bit more resources than Plots but it would be the only way to not have the AutoScale effect it. Otherwise, you would have to manually change the Plot values to be similar to the others. Draw objects will be process Historically as well so you may have objects being drawn in the past.
Happy to be of further assistance.JCNinjaTrader Customer Service
Comment
-
Dear JC, thank you very much!Originally posted by NinjaTrader_JC View PostHello alexstox,
Draw objects can be used in both Indicator and Strategies. They do use a bit more resources than Plots but it would be the only way to not have the AutoScale effect it. Otherwise, you would have to manually change the Plot values to be similar to the others. Draw objects will be process Historically as well so you may have objects being drawn in the past.
Happy to be of further assistance.
1) How can I add any value in the right corner of indicator panel (window)? For example MAX value.
2) In my indicator I need one component to be plot in other panel (window) on the chart. For example, MAX of my value, will be plotted in next panel (window) on the chart. How to script this? For example in strategy script I've usedCode:MyIndicator().Panel=1;
Last edited by alexstox; 01-15-2014, 04:10 PM.
Comment
-
Hello alexstox,
1. This one will be a two part item. The first, to draw on the same panel as your Plot you will want to set "DrawOnPricePanel" to false.
The second, to draw in the text in a specific position of the screen you may use the DrawTextFixed() method. For example "DrawTextFixed("tag1", "Text to draw", TextPosition.BottomRight);"
2. To have your Indicator plot on another panel you may just want to use "Overlay = false;" inside of Initialize().
JCNinjaTrader Customer Service
Comment
-
DrawOnPricePanel controls where all drawings go, subsequent to where the instruction is assigned.Originally posted by alexstox View PostWell, I for second question I need to clarify.
MyIndicator consists of several components: Max(), Min(), SMA() etc. How to order from MyIndicator to plot Max() in other panel than MyIndicator? Is it possible?
Comment
-
Hello alexstox,
Your Indicator will use the same COBC settings as your strategy so if your Strategy is COBC set to false your Indicator will use COBC false as well.
If you still want to keep your logic at the close of each bar you check for the FirstTickOfBar so that way it will only process your Indicator when a bar has been closed.
Here is an example of this that you may view.
JCNinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
608 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
355 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 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
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
561 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment