Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

error code says this is a type but used like a variable

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

    error code says this is a type but used like a variable

    I tried to run a strategy in Ninja 7 and got this error:

    'NinjaTrader.Indicator.FluxTimeCycleMarkers' is a 'type' but is used like a 'variable' CS0118 - click for info 162 9
    This message appeared on lines 162, 163,165, and 166

    I tried substituting square brackets for the round brackets per the instructions in CS0118 but still get the errors.

    Any help on what can fix this error would be greatly appreciated.

    Here is the section of the program that the error refers to:

    // Variables
    private double BuyMarkerPrice;
    private double SellMarkerPrice;

    private FluxTimeCycleMarkers flux=null;
    private FluxTimeCycleMarkers fluxPZ=null;

    #endregion


    protected override void Initialize()
    {
    Print(Time[0].ToString()+"...Initialize ESstoplight");
    int BaseTimeframeInMinutes = 1;

    162 FluxTimeCycleMarkers(Flux_AnalysisType.AMACD, pDperiod, pKperiod).PredictionMsgLoc = FluxTimeCycleMarkers_PredictionLocType.BottomCente r;
    163 Add(FluxTimeCycleMarkers(Flux_AnalysisType.AMACD, pDperiod, pKperiod));

    165 FluxTimeCycleMarkers(Flux_AnalysisType.PowerZone, Dperiod, pKperiod).PredictionMsgLoc = FluxTimeCycleMarkers_PredictionLocType.TopCenter;
    166 Add(FluxTimeCycleMarkers(Flux_AnalysisType.PowerZo ne, pDperiod, pKperiod));
    //}
    Last edited by rkost; 05-26-2013, 11:41 AM.

    #2
    Hello rkost,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    I am unfamiliar with the indicator FluxTimeCycleMarkers, so I must ask what the following lines are intended to do in the Initialize() method:
    Code:
    FluxTimeCycleMarkers(Flux_AnalysisType.AMACD, pDperiod, pKperiod).PredictionMsgLoc = FluxTimeCycleMarkers_PredictionLocType.BottomCente r; 
    FluxTimeCycleMarkers(Flux_AnalysisType.PowerZone, Dperiod, pKperiod).PredictionMsgLoc = FluxTimeCycleMarkers_PredictionLocType.TopCenter;
    If possible may I review the entire code for this indicator and the strategy you are developing?

    If you prefer, you can send your files to support[at]ninjatrader[dot]com with 'ATTN: Patrick - 852046' in the subject line.

    I look forward to your response.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    559 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    546 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X