Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bear Range Application.

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

    Bear Range Application.

    Hey Everyone,

    I was trying to use Leon Wilson's Bear Range Trailing Stop in a strategy(if the close is below it, buy arrow) but I always get a 1502(column 36) and a 1503(column 62) error.

    I did it successfully with the RSI Bands. The error seems to relate to the date that the Bear Range starts. The compiler seems to reject that. Also, they underline the "BearRangeTrailingStop" part.

    If anyone can fudge with it and get it to work, I'll much obliged.
    Last edited by Drakmyre; 08-21-2008, 10:32 PM.

    #2
    Please click on the compile error which will bring you to the erroneous code line where you then can fix the coding bug.

    Comment


      #3
      Errors.

      Dierk,

      The errors are:

      The best overloaded method match for 'NinjaTrader.Strategy.Strategy.BearRangeTrailingSt op(int, system.DateTime, int, double)' has some invalid arguments (67,35)

      Argument '2': cannot convert from 'int' to 'System.DateTime' (67,61)

      One seems to stem from the 2003 part of the date. The other is focused on the "BearRangeTrailingStop" part of the same line.

      // Condition set 4
      if (CrossBelow(Close, BearRangeTrailingStop(21, 20031219, 10, 3.8).BearRangeTrailStop, 1))
      {
      DrawTriangleUp("My triangle up" + CurrentBar, false, 0, Low[0] + 1 * TickSize, Color.Lime);
      }
      }

      I tried to bold the part of the code it does not like.

      Comment


        #4
        Unfortunately we do not provide support down to the level of fixing actual C# coding bugs. You would need to roll up sleeves and rip through the bugs by yourself.

        Also:
        - the strategy you posted below has nothing to do with the code snippet you posted.
        - please contact the author of the BearRangeTrailingStop to clarify if and how this indicator could be used in the strategy wizard

        Comment

        Latest Posts

        Collapse

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