Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Markers not sticking

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

    Markers not sticking

    I'm trying to place a marker on the price chart when conditions are met. It works great but as soon as the condition triggers again, the previous marker disappears. Here is the code I've inserted into an indicator:

    [Code deleted by poster]


    Any quick help please?
    Last edited by eDanny; 07-25-2008, 09:38 PM.
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    #2
    You are using the same draw object tag "Buy" or "Sell" which will always then relocate the triangle. You need to use unique tag for each draw object you wish to fix on the chart.

    Try:

    DrawTriangleUp("Buy" + CurrentBar, true, 0, High[0] + 2 * TickSize, Color.Green);
    RayNinjaTrader Customer Service

    Comment


      #3
      Nice, worked like a charm. I thought it had something to do with that but didn't know how to fix it. TY
      eDanny
      NinjaTrader Ecosystem Vendor - Integrity Traders

      Comment


        #4
        Now I'm trying to toggle whether to plot them or not with a bool variable but am doing something wrong.
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #5
          What's your question?
          RayNinjaTrader Customer Service

          Comment


            #6
            from variables area:

            private bool triangles = false;

            the code:

            if (triangles == true);

            [Code deleted by poster]


            My question is, why is the test not working? Gotta admit I'm flying blind here!
            Last edited by eDanny; 07-25-2008, 09:39 PM.
            eDanny
            NinjaTrader Ecosystem Vendor - Integrity Traders

            Comment


              #7
              Try removing the indicator and adding it back again to see if it makes a difference. A quick glance, code looks fine in concept.

              Last resort is to debug - http://www.ninjatrader-support.com/v...ead.php?t=3418
              RayNinjaTrader Customer Service

              Comment


                #8
                Resolved.

                Replaced this:

                if (triangles == true);

                with this:

                if (triangles == true)

                After taking another look at it, the fix just jumped out at me. Thanks for the help.
                eDanny
                NinjaTrader Ecosystem Vendor - Integrity Traders

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                571 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                331 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                549 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                549 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X