Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Type CustomEnumNamespace.UniversalMovingAverage

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

  • aelagha
    replied
    Ok, good to be aware of that. Thanks again.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Alaa,

    It is expected behavior.

    When a script gets moved to a subfolder, the namespace is appended with the sub folders name automatically. This does carry the side effect that custom enums that are in a sub-namespace will have the sub-namespace they were created in change. The NinjaScript Editor is not smart enough to change the whole code, or differentiate which namespace lines should be modified when moving to a sub folder.

    A quick change of reverting the custom namespace at line 112 back to "namespace NinjaTrader.NinjaScript.Indicators.CustomEnumNames pace" will get things compiling again, and would be recommended for moving other scripts that have enums in custom namespaces included.

    Let us know if you have any additional questions.

    Leave a comment:


  • aelagha
    replied
    Hi Juim,

    Here is what was going on:

    When I imported the the script, it was placed under the Indicator folder in Ninjascript, and has no issues. However, to keep my custom indicators separate from the built in ones, I have a subfolder under Indicators. When I move the imported script to the subfolder, for some reason, Ninjascript stripped off the CustomEnum namespace and replaced with another one. See the image attached.

    Is this expected behavior? is using subfolders okay, or am I missing something?

    thanks,
    -Alaa

    Leave a comment:


  • aelagha
    replied
    Hi Jim.

    I downloaded it from https://ninjatrader.com/support/helpGuides/nt8/.

    I downloaded and imported it again. It compiles and the namespace is therre. I am not sure if I did not import it properly the first time. All is good. Thanks for your help.
    Attached Files
    Last edited by aelagha; 08-05-2021, 12:32 PM.

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Alaa,

    Thanks for your post.

    Could you share the exact spot you downloaded the reference sample? It compiles fine on my end. I am curious if perhaps a localized Help Guide page has an improper link.

    The CustomEnumNamespace should be found at line 112 in the example.

    I have attached screenshots for context.

    If you downloaded from a different URL, could you share the URL you downloaded the file from?

    I look forward to your reply.
    Attached Files

    Leave a comment:


  • aelagha
    started a topic Type CustomEnumNamespace.UniversalMovingAverage

    Type CustomEnumNamespace.UniversalMovingAverage

    Hi there,

    The code for the reference sample "Creating a user-defined parameter type (enum)" use a type "CustomEnumNamespace.UniversalMovingAverage" which is not defined anywhere and produces a compile error, i.e. name space "CustomEnumNamespace" does not exit. I could not find any reference to this type in the refrence manual. I am using ver 8.0.24.3. Is this type defined somewhere?

    Thanks
    -Alaa

Latest Posts

Collapse

Topics Statistics Last Post
Started by RaddiFX, Yesterday, 11:57 PM
1 response
4 views
0 likes
Last Post NinjaTrader_Marco  
Started by Tonofit, Today, 12:00 AM
0 responses
1 view
0 likes
Last Post Tonofit
by Tonofit
 
Started by ck6libra, Yesterday, 11:20 PM
1 response
5 views
0 likes
Last Post NinjaTrader_Manfred  
Started by witipica, Yesterday, 10:02 PM
1 response
13 views
0 likes
Last Post NinjaTrader_ChrisSch  
Started by rtwave, Yesterday, 09:52 PM
0 responses
8 views
0 likes
Last Post rtwave
by rtwave
 
Working...
X