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 rbeckmann05, Yesterday, 06:48 PM
    1 response
    12 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    15 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Working...
    X