Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

user import issue

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

    user import issue

    hi i have strategy and indicatr suite that i export but when user installs it he gets error
    error CS0246: The type or namespace name 'TextPosition' could not be found (are you missing a using directive or an assembly reference?)

    first three files indicators are enums.
    my strategy also has additional enums.
    Click image for larger version  Name:	image.png Views:	0 Size:	263.0 KB ID:	1342456

    ​am i expoorting it correctly?
    Click image for larger version  Name:	image.png Views:	0 Size:	48.4 KB ID:	1342424
    Last edited by tkaboris; 05-07-2025, 05:24 AM.

    #2
    some other screenshots
    from strategy of references
    Click image for larger version

Name:	image.png
Views:	123
Size:	407.1 KB
ID:	1342462

    Comment


      #3
      Hello tkaboris,

      Thank you for your post.

      Is this a compiled assembly that you shared with them?

      Are you using Draw.TextFixed() in any of these scripts?

      Comment


        #4
        hi yes its compiled
        yes i use in strategy
        Draw.TextFixed(this, AtrDrawTagStrategy, atrText, TextPosition.TopRight,
        textColor, textFont, Brushes.Transparent, Brushes.Transparent, 0);​

        and in indicator
        if (ShowATR)
        {
        if(atrIndicatorForDisplay != null && atrIndicatorForDisplay.IsValidDataPoint(0) && CurrentBars[0] >= ATRPeriodForDisplay)
        {
        double currentAtr = atrIndicatorForDisplay[0];
        string tickFormat = Core.Globals.GetTickFormatString(Instrument.Master Instrument.TickSize);
        string atrFormattedValue = currentAtr.ToString(tickFormat);
        string atrText = string.Format("ATR({0}): {1}", ATRPeriodForDisplay, atrFormattedValue);
        Draw.TextFixed(this, AtrDrawTag, atrText, TextPosition.TopRight, ChartControl.Properties.ChartText, ChartControl.Properties.LabelFont, Brushes.Transparent, Brushes.Transparent, 0);
        }
        }

        if (DrawLabel)
        {
        Draw.TextFixed(this, "FVG_PERIOD_" + InstanceId, sDataSeries, LabelPosition, LabelTextBrush, LabelFont, LabelBorderBrush, LabelFillBrush, LabelFillOpacity);
        }​

        Comment


          #5
          Try using the fully qualified namespace for TextPosition, as described in this post:

          Comment


            #6
            is this correct compiled file content, only 3 files? for exported compiled and protected?
            note i dont have Onesetupforlife file itself it is what i specify in export

            Click image for larger version

Name:	image.png
Views:	117
Size:	90.5 KB
ID:	1342491

            Comment


              #7
              I dont knwo what i am doing wrong but my enums are not allwoing users to install strategy.
              i have enums outside the main class
              5/7/25 13:36 Default Error compiling import assembly: C:\Users\tkabo\Documents\NinjaTrader 8\bin\Custom\TradersAllyOneSetupStrategy.cs(49,666 ): error CS0246: The type or namespace name 'FVGFillType_TAOSFL' could not be found (are you missing a using directive or an assembly reference?)
              5/7/25 13:36 Default Error compiling import assembly: C:\Users\tkabo\Documents\NinjaTrader 8\bin\Custom\TradersAllyOneSetupStrategy.cs(49,604 ): error CS0246: The type or namespace name 'FVGPeriodTypes_TAOSFL' could not be found (are you missing a using directive or an assembly reference?)
              5/7/25 13:36 Default Error compiling import assembly: C:\Users\tkabo\Documents\NinjaTrader 8\bin\Custom\TradersAllyOneSetupStrategy.cs(37,102 5): error CS0246: The type or namespace name 'TextPosition' could not be found (are you missing a using directive or an assembly reference?)
              5/7/25 13:36 Default Error compiling import assembly: C:\Users\tkabo\Documents\NinjaTrader 8\bin\Custom\TradersAllyOneSetupStrategy.cs(37,643 ): error CS0246: The type or namespace name 'FVGFillType_TAOSFL' could not be found (are you missing a using directive or an assembly reference?)
              5/7/25 13:36 Default Error compiling import assembly: C:\Users\tkabo\Documents\NinjaTrader 8\bin\Custom\TradersAllyOneSetupStrategy.cs(37,581 ): error CS0246: The type or namespace name 'FVGPeriodTypes_TAOSFL' could not be found (are you missing a using directive or an assembly reference?)


              links to files i use for export compile assembly
              Last edited by NinjaTrader_Gaby; 05-07-2025, 11:52 AM. Reason: removed links - please do not post links to non-educational external sites

              Comment


                #8
                Hello,

                Unfortunately I had to remove your links because we do not allow non-educational links to external sites. If you'd like to share your code, post snippets or add an attachment of the .cs files themselves.

                Regarding the use of enums, are you creating the enum outside of your NinjaScript class, and designating it in its own fully qualified namespace?

                An example can be found here:

                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