Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Please can someone help

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

    Please can someone help

    I am trying to learn how to write strategies in ninjascript, I am just trying to adjust indicators to enter positions on signal. I am hitting a brick wall with the attached as I keep getting compile errors I dont understand how to fix or what I have done wrong.

    Can someone help point this out to me and let me know how I can fix it??
    Attached Files

    #2
    Originally posted by mccallum28 View Post
    I am trying to learn how to write strategies in ninjascript, I am just trying to adjust indicators to enter positions on signal. I am hitting a brick wall with the attached as I keep getting compile errors I dont understand how to fix or what I have done wrong.

    Can someone help point this out to me and let me know how I can fix it??
    For starters, your bracketing on this line looks incorrect, and you have a terminal forward slash that cannot mean anything.
    Code:
    zltema34slope = (int)(radToDegrees*(Math.Atan((ZeroLagTEMA))(Period))[0]-(ZeroLagTEMA(Period)[1]+ZeroLagTEMA(Period)[2])/2)/1.5/);

    Comment


      #3
      I think the best way that is you lean all strategies first..when you have knowledge you may write all thing you want. good luck!

      Comment


        #4
        mccallum28, there are a few issues seen with your code - I would suggest working through our tutorials and the wizard first to get a good understanding of the possibilities and syntax needed, for example you had one variable misspelled (NinjaScript / C# is case sensitive) and strategies could not use the indicator plot statements / code, this would lead to compile error as well, this then in turn removes the need for the serialization aspects in the properties section as well. A good basic script to learn from would be for example our SampleMACrossOver strategy, you can copy it to a new file via renaming and then modify it working for example your ZLEMA's in as first step.

        Comment


          #5
          Originally posted by proemini View Post
          I think the best way that is you lean all strategies first..when you have knowledge you may write all thing you want. good luck!
          Welcome here to our forums and thanks for the input.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          648 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          369 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          108 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          572 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X