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

Drawn Horizontal Line with price marker?

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

    Drawn Horizontal Line with price marker?

    When my indicator draws a horizontal line I would like it to also "issue" a price marker where that line is at. As the line is drawn and not based on a plot I can't see how to get that done.

    {
    DrawLine("SLup", false, 0, Low[0], 1, Low[0], upColor, DashStyle.Solid, 2);
    }

    This line is drawn only when my conditions are fulfilled. When the conditions change, the line disappears and I would like the price marker to then also disappear.

    Is there a way to accomplish that?

    sandman

    #2
    Hello sandman,

    A price marker can only be created by a plot using documented methods.

    Create a plot, set the pen of the plot to the color you want the marker to appear. Optionally, set each bars PlotColors to Color.Empty to hide the line on the chart but still show the marker.

    When you want the marker to disappear, set the pen color to Color.Transparent.

    PlotColors - http://ninjatrader.com/support/helpG...plotcolors.htm
    Plots - http://ninjatrader.com/support/helpGuides/nt7/plots.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ghoul, Today, 06:02 PM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    44 views
    0 likes
    Last Post jeronymite  
    Started by Barry Milan, Yesterday, 10:35 PM
    7 responses
    20 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by AttiM, 02-14-2024, 05:20 PM
    10 responses
    180 views
    0 likes
    Last Post jeronymite  
    Started by DanielSanMartin, Yesterday, 02:37 PM
    2 responses
    13 views
    0 likes
    Last Post DanielSanMartin  
    Working...
    X