Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Develpoment or Strategy Builder?

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

    #31
    Hello trdninstyle,

    Thank you for your reply.

    Your screenshot does not show the full script, but for each open curly bracket: { there must be a matching closing curly bracket: }
    If you click on an open bracket, it should be highlighted and show the closing bracket that it is paired with. You may need to add/remove curly braces in order to resolve the error. The error message in your screenshot typically means there is actually an extra curly bracket in your script. If you remove the bracket in line 74, I suspect this might resolve the error.

    I have included a screenshot pointing this out, as well as the startY value which you still have set to "- TickSize"
    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    Have a wonderful weekend and please don't hesitate to reach out with any additional questions.

    Comment


      #32
      That worked really well Emily, thank you.

      I made a video going over items with what happens, it's easier than screenshots and u can see the whole script.
      Now I feel revived, yesterday I was making mistakes on another script which now I know what I did wrong there.
      Just needed 24 hrs not a week. Now I am having a wonderful weekend
      Last edited by trdninstyle; 10-17-2022, 12:25 PM.

      Comment


        #33
        Hello trdninstyle,

        Thank you for your reply.

        In order to resolve the error (which does seem to resolve on its own after compiling) you may want to create a new indicator going through the new indicator wizard (in NinjaScript Editor, right-click on indicators folder and select New Indicator) then only copy your logic inside of each method, without adjusting the curly braces for each method within the indicator script.

        Please let us know if we may be of further assistance.

        Comment


          #34
          Okay I'll do that, and I am also going thru the wizard to make a strategy so I can go thru that whole process, 401 video.

          Setting aside that temporary error that seems to fix itself, now that I have that rectangle the size that I was looking for. How do I make the squares plot out as to stay there and not just as one example, the tag1.

          This is the single one where square paints as I want it to:
          Draw.Rectangle(this, "tag1", false, 10,Low[3]-TickSize, 8, High[0] + TickSize, Brushes.Lime, Brushes.Lime, 50);


          This was my own attempt to merge in the previous language with the above to have it print out and to stay there. But doesn't work.
          Draw.Rectangle(this, "tag1" + CurrentBar. ToString(), false, 10,Low[3]-TickSize, 8, High[0] + TickSize, Brushes.Lime, Brushes.Lime, 50);

          + CurrentBar. ToString(),

          Thank you, my good helper,

          Comment


            #35
            Hello trdninstyle,

            Thank you for your reply.

            It appears you have an extra space in CurrentBar.ToString(). There should be no space between the period and the 'T' (you currently have it as CurrentBar.[SPACE]ToString() and that is what is causing the error). Being careful with syntax is important, as the script is case sensitive and having an extra or missing space or other piece of punctuation could result in errors or unexpected behavior.

            Thank you for your time.

            Comment


              #36
              Good eye I didn't see that. Happy Monday.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              653 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              370 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              109 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              574 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              577 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X