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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Segwin, 05-07-2018, 02:15 PM
    14 responses
    1,789 views
    0 likes
    Last Post aligator  
    Started by Jimmyk, 01-26-2018, 05:19 AM
    6 responses
    837 views
    0 likes
    Last Post emuns
    by emuns
     
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    6 responses
    3,293 views
    1 like
    Last Post jgualdronc  
    Started by Touch-Ups, Today, 10:36 AM
    0 responses
    13 views
    0 likes
    Last Post Touch-Ups  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    11 responses
    63 views
    0 likes
    Last Post halgo_boulder  
    Working...
    X