Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Unable to compile ninjascript strategy from Tools>Export>Add on Strategy

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

    Unable to compile ninjascript strategy from Tools>Export>Add on Strategy

    I created a Moving Average Cross over Ninja Script Automated Strategy. In my script the FastMA is hard coded. Where as the SlowMA is user input for MA Type and Period. Allowing the user to select either SMA or EMA from a dropdown. Although I am able to easily compile the my strategy in NinjaScript Editor but not able to export it from ninjascript strategy from Tools>Export>Add on Strategy as it is giving my compiling errors.

    For my ninjascript Moving Average crossover strategy I have:
    a private IndicatorBase as "private IndicatorBase SelectMAIndicator(MovingAverageType type, int period)" for this line I am getting the error, "error CS0246: The type or namespace name 'MovingAverageType' could not be found (are you missing a using directive or an assembly reference?)"

    I have also added the SlowMA Indicator Type in my Put parameter as:
    [NinjaScriptProperty]
    [Range(0, int.MaxValue)]
    [Display(Name = "SlowMA Indicator Type", Description = "Type of Moving Average for Slow MA", Order = 3, GroupName = "Parameters")]
    public MovingAverageType SlowMAIndicatorType { get; set; }
    For these lines of codes also I am getting the same Error "error CS0246: The type or namespace name 'MovingAverageType' could not be found (are you missing a using directive or an assembly reference?)"

    Everywhere I used 'MovingAverageType' I am getting the Error "error CS0103: The name 'MovingAverageType' does not exist in the current context"​

Latest Posts

Collapse

Topics Statistics Last Post
Started by NullPointStrategies, Today, 05:17 AM
0 responses
44 views
0 likes
Last Post NullPointStrategies  
Started by argusthome, 03-08-2026, 10:06 AM
0 responses
125 views
0 likes
Last Post argusthome  
Started by NabilKhattabi, 03-06-2026, 11:18 AM
0 responses
65 views
0 likes
Last Post NabilKhattabi  
Started by Deep42, 03-06-2026, 12:28 AM
0 responses
42 views
0 likes
Last Post Deep42
by Deep42
 
Started by TheRealMorford, 03-05-2026, 06:15 PM
0 responses
46 views
0 likes
Last Post TheRealMorford  
Working...
X