• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MarketAnalyzerColumn - SMA(int) 'method' but is used like a 'type'

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

    MarketAnalyzerColumn - SMA(int) 'method' but is used like a 'type'

    I get the following error below when trying to call an indicator from a custom Market Analyzer Column using this code. It works just fine in indicators and strategies.


    PHP Code:
        public class test MarketAnalyzerColumn
        
    {
            private 
    SMA smaSlow;

            protected 
    override void OnStateChange()
            {
                if (
    State == State.SetDefaults)
                {
                    
    Description                    = @"t";
                    
    Name                        "test";
                    
    Calculate                        Calculate.OnBarClose;
                    
    Slow                                                25;
                }
                else if (
    State == State.Configure)
                {
                    
    smaSlow SMA(Slow);
                }
            } 

    'NinjaTrader.NinjaScript.MarketAnalyzerColumns.Mar ketAnalyzerColumn.SMA(int)' is a 'method' but is used like a 'type' CS0118

    #2
    Hello cutzpr,

    Thank you for your post.

    Indicators could not be used as variables in the Market Analyzer Columns. You will likely find what you need by creating an indicator and using the Indicator Column in the Market Analyzer to call your custom indicator.
    Patrick H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SAILIKITY, 05-22-2019, 05:41 PM
    1 response
    3 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by rmillar, 01-09-2019, 06:02 PM
    6 responses
    60 views
    1 like
    Last Post eDanny
    by eDanny
     
    Started by mlarocco, Today, 11:39 AM
    4 responses
    19 views
    0 likes
    Last Post mlarocco  
    Started by roblogic, Today, 11:19 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by saeed, Today, 10:17 AM
    8 responses
    49 views
    0 likes
    Last Post NinjaTrader_Kate  
    Working...
    X