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

Clear Method Indicator

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

    #16
    Originally posted by Thomas79 View Post
    Hi StockJock

    this is the indicator of Ron Black's Clear Method from the "Technical Analysis of Stocks & Comodities" magazine, September 2010, the one than you talk on your first message...
    This is a good indicator for buy and sell signals on the proper time frame, because it looks like a zero lag indicator. I'm just learning NJ7's C# language to develop strategies. Your code has some potential. I hope you can get it to work.

    I didn't know that the indicator has a function that you could call from a strategy when conditions change. If I knew C#, I would try to reference the swing conditions. What I mean is when the condition for uptrend changes to the condition for a down trend (or vice versa). Do you see anything like that in the code?

    I'm trying to read the C# of the indicator for buy and sell conditions and I think it would be something like this.
    Code:
     
    // Selling Short condition
    if (ShortTermSwings().Trend[0] == -1  && ShortTermSwings().Trend[1] == 1)
    {
    ExitShort(DefaultQuantity, "Vente");
    SetProfitTarget("Vente", CalculationMode.Ticks, 42*TickSize);
    }
    //  *********************************
    // Buying To Cover condition
    if (ShortTermSwings().Trend[0] == 1  && ShortTermSwings().Trend[1] == -1)
    {
    EnterShort(DefaultQuantity, "Achat");
    SetProfitTarget("Achat", CalculationMode.Ticks, 42*TickSize);
    }
    If you complete the stategy code, please share it with me. Thanks.

    NinjaTrader Clear Method indicator
    Last edited by StockJock; 05-28-2012, 06:19 PM.

    Comment


      #17
      Thomas,

      One thing I just noticed here in your code :

      SetProfitTarget("Vente", CalculationMode.Ticks, 42*TickSize);

      The TickSize multiplication here isn't needed. Are you still experiencing this issue?
      Adam P.NinjaTrader Customer Service

      Comment


        #18
        Hi Adam

        you're right, i don't need to include "TickSize" on my script

        Thomas

        Comment


          #19
          Hi StockJock

          i have this code working well

          // Condition Buy
          if (ShortTermSwings().Trend[0] > ShortTermSwings().Trend[1])
          {
          EnterLong(DefaultQuantity,
          "Achat");
          SetProfitTarget(
          "Achat", CalculationMode.Ticks, 42);
          }
          // Condition Sell
          if (ShortTermSwings().Trend[0] < ShortTermSwings().Trend[1])
          {
          EnterShort(DefaultQuantity,
          "Vente");
          SetProfitTarget(
          "Vente", CalculationMode.Ticks, 42);

          }

          Comment


            #20
            Originally posted by Thomas79 View Post
            Hi StockJock
            i have this code working well
            I'm glad to hear that you got it to work. I've been trying to learn C# and I was looking for a C# programmer's discussion in a Yahoo Group or a Google Group, but I'm confused between C# and C#.net. Is there a difference?

            Also, if you would, tell me how I place this into NinjaTrader to test it. Thanks much.

            C# for Absolute Beginners
            Last edited by StockJock; 05-29-2012, 05:45 PM.

            Comment


              #21
              In the article that Ron Black's Clear Method indicator is referenced, Raymond Deux &amp; Art Runelis wrote: "This indicator is for NinjaTrader version 7 or greater...." But when I try to import on my NT 8 I get Error msg: "Selected file was made from an older, incompatible version of NT or is not a NinjaScript archive" Am I overlooking something or can Support or anyone confirm it is in fact not compatible with NT 8? Thank you, Mine is Version 8.0.27.1 64bit
              (Here's the article: http://traders.com/Documentation/FEE...Tips.html#TT11

              Comment


                #22
                Hello hoot44,

                Thanks for your note.

                The indicator you mentioned is only supported for use with NinjaTrader 7, not NinjaTrader 8.

                This could be seen by downloading the .ZIP file and looking at the Info.xml file which shows the script is for NinjaTrader 7.

                There are no versions of this script supported for NinjaTrader 8. You could consider converting the script to be used with NinjaTrader 8 if you wish. If you would like to convert the script, please let me know and I will provide you with some direction to get you started.

                Let me know if I may assist further.
                Brandon H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by rhyminkevin, Today, 04:58 PM
                3 responses
                47 views
                0 likes
                Last Post Anfedport  
                Started by iceman2018, Today, 05:07 PM
                0 responses
                5 views
                0 likes
                Last Post iceman2018  
                Started by lightsun47, Today, 03:51 PM
                0 responses
                7 views
                0 likes
                Last Post lightsun47  
                Started by 00nevest, Today, 02:27 PM
                1 response
                14 views
                0 likes
                Last Post 00nevest  
                Started by futtrader, 04-21-2024, 01:50 AM
                4 responses
                50 views
                0 likes
                Last Post futtrader  
                Working...
                X