• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 Mr.Trader, Today, 04:11 AM
        0 responses
        4 views
        0 likes
        Last Post Mr.Trader  
        Started by 3lliot, Today, 01:00 AM
        2 responses
        9 views
        0 likes
        Last Post 3lliot
        by 3lliot
         
        Started by JohnSteinberg, Yesterday, 04:19 AM
        0 responses
        22 views
        0 likes
        Last Post JohnSteinberg  
        Started by herben31, Yesterday, 03:00 PM
        0 responses
        28 views
        0 likes
        Last Post herben31  
        Started by ruedigold, Yesterday, 04:53 AM
        2 responses
        13 views
        0 likes
        Last Post sledge
        by sledge
         
        Working...
        X