Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

First go at coding without a wizard

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

    First go at coding without a wizard

    So I thought - Why not have a go at chucking the wizard and having a go at coding!

    I have spend the last few hours building three of my strategies into one!

    I clicked compile 4 times each time with a new set of problems to fix- but I followed links to answers and even googled some codes until - finally the complier said my strategy had generated successfully with - wait for it- 26 parameters!
    So all is good until I ran a simple 1 month back~test.
    my parameters don't show up in the dialog box and when I click to start -it takes forever and things seem to have locked up.
    Have I got too many parameters?
    If it said it was generated successfully doesn't that mean that it should fire up when running a back~test?
    Hope someone can help.
    raycam
    btw- when I clicked to compile a notice came up saying something about debugging mode and so I avoided clicking to agree to compile. Thats when it seemed to do something anyway by letting me know all my errors.
    rc

    #2
    raycam,

    Compiling successfully does not guarantee a successful run of the strategy. It just means there are no general syntax issues and such. Runtime errors are determined when you actually use the strategy. Please see your Control Center logs for errors.

    For parameters to show up you actually have to add them to the Properties region of your code as well as create a private variable in the Variables region. Please open up the code for the SMA indicator and look at those two regions for the Period parameter. Pay special attention to what is capitalized and what is not.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks for that reply-
      I checked the coding on the SMA and realized I had issues with capitalisation. That fixed I went through the compiling stage again- this time agreeing to the little pop up about debugging. Once completed it did say the strategy was compiled successfully and I went to add it to a chart- there in the strategy selection area- IT APPEARED- with ALL the parameters. I thought I had succeeded- but when I went to strategy analyzer and clicked on it in the drop down list- only the name appears- there are no parameters to adjust.
      Am I getting there?
      raycam

      Comment


        #4
        raycam,

        Hard to say in generalities. I suggest you first try a script that is significantly simpler so you can see how it works. Then add on layers of functionality.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        627 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        359 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        562 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X