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
use OnRender on an indicator's panel
Collapse
X
-
Paul H.
Thanks for your reply. I got it working; the problem was, since I want y-axis to be below 0 line if macd > 0 (and vice versa), I was assigning 0 directly to y-axis instead of GetYByValue(0). It works perfectly (if macd > 0) as it adjusts automatically as I scroll forwards or back; the same for charts with shorter or longer time frame.
The problem now is when macd < 0, the text should be drawn just above the 0 line. I need a y-axis that behaves like GetYByValue(0) but above the 0 line. Assigning a constant value like GetYByValue(1.618) does not produce the same effect as GetYByValue(0), as the text moves out of proportion when scrolling through the chart.
Leave a comment:
-
Hello satoyama,
Thanks for your post.
When you modify your MACD with OnRender() coding, it will use the panel that the MACD is assigned to when the indicator is loaded.
Leave a comment:
-
You have to open de samplecustomplot in the ninjasctipr editor. It is in the INDICATOR folder.
Leave a comment:
-
use OnRender on an indicator's panel
This question has been probably asked but it is difficult to find the right answer. The question is, how do I use OnRender on an indicator's panel.
As an example, I have a modified MACD and I can use DrawText to draw the Hi and Low values on the zero line of the bar. But I want to use OnRender instead of DrawText.
I don't need instructions on how to use OnRender, just on how to send output to MACD's panel.
Thanks in advance.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, 04-23-2024, 07:51 PM
|
2 responses
30 views
0 likes
|
Last Post
by Max238
Today, 02:25 AM
|
||
Started by Shansen, 08-30-2019, 10:18 PM
|
24 responses
943 views
0 likes
|
Last Post
by spwizard
Today, 01:29 AM
|
||
Started by Max238, Today, 01:28 AM
|
0 responses
9 views
0 likes
|
Last Post
by Max238
Today, 01:28 AM
|
||
Started by rocketman7, Today, 01:00 AM
|
0 responses
5 views
0 likes
|
Last Post
by rocketman7
Today, 01:00 AM
|
||
Started by wzgy0920, 04-20-2024, 06:09 PM
|
2 responses
28 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:43 PM
|
Leave a comment: