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:	148
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:	140
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 CarlTrading, 03-31-2026, 09:41 PM
                1 response
                72 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by CarlTrading, 04-01-2026, 02:41 AM
                0 responses
                39 views
                0 likes
                Last Post CarlTrading  
                Started by CaptainJack, 03-31-2026, 11:44 PM
                0 responses
                63 views
                2 likes
                Last Post CaptainJack  
                Started by CarlTrading, 03-30-2026, 11:51 AM
                0 responses
                63 views
                0 likes
                Last Post CarlTrading  
                Started by CarlTrading, 03-30-2026, 11:48 AM
                0 responses
                53 views
                0 likes
                Last Post CarlTrading  
                Working...
                X