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

strategy + zigzag copy = input not available + error cexporting

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

    strategy + zigzag copy = input not available + error cexporting

    hi everyone,

    I have trouble with an indicator : I cannot call it as I wish from a strategy.
    I gladly would have made a sample of the issue, but I was not able to export the sample strategy, so let me put it in a few words :

    I made a copy of the zigzag,
    I want to call it from a strategy, but there is no input in the indicator parameters (within the parenthesis, from the strategy)... so I can't apply the indicator on a series<double> like the macd as the input... it only applies on price series...

    in the editor, when the cursor is on the name of the indicator :
    - in the indicator script, it shows the input in the parenthesis, before deviationType and so on.,
    - in the strategy script , there is no input series in the parenthesis, they just start with deviationType.​

    when I tried to export all those 2 sample scripts to make it simple for the reader, we get an error "the type or namespace name'deviation type' could not be found" (cs0246 )

    I assume both issues might be related, can anyone let me know what I should try to make this functional ?
    is there a using devclaration needed to have the deviation type be found ?

    edit :
    we cannot export both strategy or indicator.
    but the strategy can be exported when we comment the declaration line of the indicator.
    Last edited by Amedeus; 03-31-2023, 06:27 AM.

    #2
    hey,

    attached are some sceenshot of the scripts.

    the zigzag has had no changes but the yellow marked lines.

    the indic3 picture illustrates my issue : the underlined method is what is available from the strategy, but I wish there was an input parameter to fill here.
    Attached Files

    Comment


      #3
      Hello Amedeus,

      The ZigZag has an enum named DeviationType.

      May I confirm you have changed this name of the enum in the copy and that you are referencing that new name in the code?
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        hey Chelsea, thank you very much,

        Spot on, indeed I touched the public enum : I forgot to mention I did not just rename the public enum, I deleted it, since it was not inside the ZigZag.
        But there is no second deviation type enum I would have created.
        I assumed this one could be used in another script since it is not from inside the ZigZag.
        Last edited by Amedeus; 03-31-2023, 09:10 AM.

        Comment


          #5
          Hello Amedeus,

          Are you exporting the original ZigZag with your export to make sure that enum is included?
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            hey Chelsea, thank you,

            I just declared the ZigZag in the copy indicator, then could export.
            got it.

            It also made the input parameter form the strategy available.

            Thank you very much again. have a great day.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by DanielTynera, Today, 01:14 AM
            0 responses
            2 views
            0 likes
            Last Post DanielTynera  
            Started by yertle, 04-18-2024, 08:38 AM
            9 responses
            40 views
            0 likes
            Last Post yertle
            by yertle
             
            Started by techgetgame, Yesterday, 11:42 PM
            0 responses
            9 views
            0 likes
            Last Post techgetgame  
            Started by sephichapdson, Yesterday, 11:36 PM
            0 responses
            2 views
            0 likes
            Last Post sephichapdson  
            Started by bortz, 11-06-2023, 08:04 AM
            47 responses
            1,615 views
            0 likes
            Last Post aligator  
            Working...
            X