Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 yertle, Yesterday, 08:38 AM
    7 responses
    28 views
    0 likes
    Last Post yertle
    by yertle
     
    Started by bmartz, 03-12-2024, 06:12 AM
    2 responses
    21 views
    0 likes
    Last Post bmartz
    by bmartz
     
    Started by funk10101, Today, 12:02 AM
    0 responses
    4 views
    0 likes
    Last Post funk10101  
    Started by gravdigaz6, Yesterday, 11:40 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by MarianApalaghiei, Yesterday, 10:49 PM
    3 responses
    11 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X