Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CS 0119 error

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

    CS 0119 error

    I'm trying to use TSSuperTrend Indicator in a strategy except I'm getting a CS 0119 error. The variables in the Indicator are:

    #region variables
    private MovingAverageType _maType = MovingAverageType.HMA;
    private SuperTrendMode _smode = SuperTrendMode.ATR;
    #endregion

    And the error lines in the strategy are:
    ...is a 'method', which is not valid in the given context. ...What does this mean and how do you fix it?

    protected
    overridevoid Initialize()
    {
    Add(TSSuperTrend(
    14, TSSuperTrend.Utility.MovingAverageType.HMA, 2.618, 14, TSSuperTrend.Utility.SuperTrendMode.ATR));

    CalculateOnBarClose =
    true;
    }
    The strategy was generated by the Wizard
    Last edited by kenb2004; 06-06-2011, 02:33 PM.

    #2
    Hello,

    There are many post on how to use this indicator in the strategy in the thread on this forum that is quite large on this indicator.

    If I remember correctly you need to add a using statement to the top before you can use this indicator. I did a quick search and found another thread I answered on this below.



    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Thanks

      I added

      using TradingStudies.NinjaScript.Utility;
      using TSSuperTrend.Utility;

      to declarations

      Then I got a CS0246 error which says to re-import the DLL .
      Where do I get this DLL?

      Comment


        #4
        Hello,

        Can you send me a screenshot of the error as I'm not familiar with this error.

        To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.


        I look forward to assisting you further.
        BrettNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        52 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        23 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        16 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        24 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X