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!
See more
See less

Partner 728x90

Collapse

Plot colors and pricemarker

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Plot colors and pricemarker

    An indicator I am using is an EMA which is colored only when certain conditions are met. The price marker too changes its color. So far so good.

    When the conditions are not met, the EMA line is not drawn - BUT it still draws a price marker which looks as though it is transparent. See attached.

    I do want the price markers when they are colored i.e. when my conditions are met but not when they are not met.

    How can I achieve that?

    sandman
    Attached Files

    #2
    Hello sandman,

    Thanks for opening the thread.

    I would advise to use Color.Transparent instead of Color.Empty for your the plot in which you do not want to see a price marker. I have attached a simple demonstration for your reference.

    Additional reference for multi colored plots can be seen in the documentation and example here: https://ninjatrader.com/support/foru...ead.php?t=3227

    If there is anything else we can do to help, please let us know.
    Attached Files
    JimNinjaTrader Customer Service

    Comment


      #3
      Jim.

      Thanks for your input. It took some time for me to review in detail what you referred too. In short it does NOT resolve what I asked. I have no problem creating a plotted line in different colors depending on whether it is falling or rising or based on my conditions. The plotted line colors beautifully and disappears totally when my conditions are not met. My problem is with the price marker. It does not disappear but remains by giving an outline around the price. That is what I want to get rid of. And that is when I tried "Empty" and yes, also "Transparent". Same result. See image attached to first posting in this thread. I other words, I want the price marker to only appear when the line appears. Even in the sample you enclosed, the price marker always shows up unless I overlooked something.

      How do I make the price marker disappear when the line disappears? Any suggestions?

      sandman

      Comment


        #4
        Hello sandman,

        There is a difference between using Color.Empty and Color.Transparent that we should note. Transparent will effectively hide the plot on the chart, in the data box, and the plot marker so they are not visible. The plot will still be visible with Color.Empty and we will still see a slot in the data box as well as the price marker. The price marker's color will be Color.Empty for the current bar, but it will still be visible.

        Also to note, using a transparent plot will effectively break the plot line so the other colored plots will become segmented. If the colored plots are not consecutive, we will see an entry in the data box, but we won't see the line. This could be worked around by using drawing tools to draw in the line for non-consecutive colored plots.

        I've included a demonstration showing the behavior on my end: https://www.screencast.com/t/O5JnUThC0

        If this information does not help with your inquiry, could you provide a simple test case for the exact issue so that we can both look into it further?

        I'll be happy to be of any further assistance.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 03:20 PM
        0 responses
        2 views
        0 likes
        Last Post cre8able  
        Started by Fran888, 02-16-2024, 10:48 AM
        3 responses
        46 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Started by martin70, 03-24-2023, 04:58 AM
        15 responses
        114 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by The_Sec, Today, 02:29 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by jeronymite, 04-12-2024, 04:26 PM
        2 responses
        31 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X