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

too many drawing objects

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

    too many drawing objects

    is there a way to filter or keep the drawing objects (triangles in this example) from popping up once the criteria has been met?
    maybe another "x amount" of bars required to start drawing again...


    if ((High[0] >= SMA(89)[0])
    && (High[
    0] >= KeltnerChannel(1.5, 22).Lower[0] + -2 * TickSize)
    && (SMA(
    89)[0] <= EMA(22)[0] )
    && (Diff[
    1] >= 0)
    && (Stochastics(
    5, 3, 3).K[1] <= stokl || Stochastics(5, 3, 3).K[2] <= stokl
    || Stochastics(
    5, 3, 3).K[0] <= stokl)
    )
    DrawTriangleUp(Time[
    0].ToString(), 0, Low[1] - 5.25* TickSize, Color.Yellow);

    #2
    you could add a custom flag variable like:
    - only draw if condition are met and flag is false
    - set flag to true if drawn

    -> won't draw again after flag is set

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by martin70, 03-24-2023, 04:58 AM
    14 responses
    105 views
    0 likes
    Last Post martin70  
    Started by TraderBCL, Today, 04:38 AM
    0 responses
    2 views
    0 likes
    Last Post TraderBCL  
    Started by Radano, 06-10-2021, 01:40 AM
    19 responses
    606 views
    0 likes
    Last Post Radano
    by Radano
     
    Started by KenneGaray, Today, 03:48 AM
    0 responses
    4 views
    0 likes
    Last Post KenneGaray  
    Started by thanajo, 05-04-2021, 02:11 AM
    4 responses
    470 views
    0 likes
    Last Post tradingnasdaqprueba  
    Working...
    X