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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X