Architect Code: Ninja does not compile "MyMaType"
06.11.2021 19.10

Creating Flexible Strategy Architecture in NinjaTrader 8

NinjaCoding friend

06Nov2021

Hi Yuri

I bought the Trade System Architecture Course.

I am having some problem. 

Ninja refuses to compile Architect Code because it does not recognize "MyMaType" (CS2046 error) (see photo)

Can you kindly provide some guidance?

Thank you.

Tang




  • David Eaton
    07.06.2023 04:33

    I know this is a old thread but I have the same question.


  • Yuri Zolotarev
    07.06.2023 11:03

    Now I do this...

    1) place public enumns inside strategy/indicator code

    2) when addressing enums in parameters use the full path to the enum so write StratgeyCodeName.EnumName then it will work fine.


    Do the path thing and there won't be an error.

  • David Eaton
    07.06.2023 22:54

    The problem, is that it's the automaticly modified code that has an issue with it.  You can correct it, but once you hit save it will just over write it.

  • David Eaton
    09.06.2023 00:25

    Ok,  I think I made some progress.




    I have also learned that the custom namespace needs to be in another file or under the main NameSpace.




    Here is an example of not using the "using"



     

    I hope this helps someone else.


    Thanks.