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

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 Mizzouman1, Today, 07:35 AM
                3 responses
                17 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by RubenCazorla, Today, 09:07 AM
                2 responses
                13 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by i019945nj, 12-14-2023, 06:41 AM
                7 responses
                82 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by timmbbo, 07-05-2023, 10:21 PM
                4 responses
                158 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by tkaboris, Today, 08:01 AM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Working...
                X