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
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
-
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
-
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 egordleo, Today, 05:50 AM
|
0 responses
4 views
0 likes
|
Last Post
by egordleo
Today, 05:50 AM
|
||
Started by kevinenergy, 02-17-2023, 12:42 PM
|
118 responses
2,778 views
1 like
|
Last Post
by kevinenergy
Today, 05:41 AM
|
||
Started by briansaul, Today, 05:31 AM
|
0 responses
9 views
0 likes
|
Last Post
by briansaul
Today, 05:31 AM
|
||
Started by fwendolynlpxz, Today, 05:19 AM
|
0 responses
4 views
0 likes
|
Last Post Today, 05:19 AM | ||
Started by traderqz, Yesterday, 12:06 AM
|
11 responses
28 views
0 likes
|
Last Post Today, 05:11 AM |
Comment