Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Swing indicator edits

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

    #16
    Originally posted by Rienb View Post
    if you open the script in ninjascript editor, search for the text: "green" then you come out at the swing high, then scroll a bit up or down than search for red.

    i`ve made them turquoise so if you cant get it working i can post it here....
    Yes this is how I've also had to change the colour of the lines.
    But I want to avoid having to do this each time when I add the indicator more than once to a chart.
    I want to be able to change the colour of the lines in the same way as changing the SwingHigh/Low using chart settings,
    (via right clicking the chart) ?
    The option to change line colours also needs to be in the plots section in the indicator settings but I don't know how to do this.

    Many thanks..

    Comment


      #17
      Originally posted by dj22522 View Post
      Yes this is how I've also had to change the colour of the lines.
      But I want to avoid having to do this each time when I add the indicator more than once to a chart.
      I want to be able to change the colour of the lines in the same way as changing the SwingHigh/Low using chart settings,
      (via right clicking the chart) ?
      The option to change line colours also needs to be in the plots section in the indicator settings but I don't know how to do this.

      Many thanks..
      i`m not totally in-to coding, i only use one setup and trade every market almost the same.

      what an idea is:

      Copy the inidcator and change the name to swingmodified 3, 4 and so on. and then change the colors to the right ones for every market you like...

      Comment


        #18
        Originally posted by Rienb View Post
        i`m not totally in-to coding, i only use one setup and trade every market almost the same.

        what an idea is:

        Copy the inidcator and change the name to swingmodified 3, 4 and so on. and then change the colors to the right ones for every market you like...
        That makes two of us re: coding
        It would obviously be much more user friendly but your "idea" makes sense until some kind soul can help us non-coders out.
        Appreciate the help Rienb
        thx..

        Comment


          #19
          Originally posted by dj22522 View Post
          That makes two of us re: coding
          It would obviously be much more user friendly but your "idea" makes sense until some kind soul can help us non-coders out.
          Appreciate the help Rienb
          thx..
          Yes indeed,

          I would like to know how the line of the swing hi-low can be stopped when a bar crosses the line, anyone at ninja HQ or scripters know how to do that?

          Comment


            #20
            You would need to stop setting values for your Plots (dataseries) at this point then Rienb.

            Comment


              #21
              So what do i need to change at this part of the code?

              (this is the edit on the swing that has been made already, i want the swingline to stop when a bar crosses it (so the line doesn't need to be removed when a bar crosses)

              I hope you can help me!

              if(CurrentBar > 20) // added by jabeztrading -added because was acting funding in the beginning
              {
              DrawRay("tag1"+CurrentBar, strength, currentSwingHigh, 0, currentSwingHigh, Color.Red,DashStyle.Solid,2); //added by NW
              levelsQueue.Enqueue(CurrentBar); // store bar that level occurred - added by nw

              if(levelsQueue.Count == swingstoShow+2)
              {

              levelsQueue.Dequeue();
              RemoveDrawObject("tag1"+levelsQueue.Peek());

              }
              }

              Comment


                #22
                You can't "stop" a ray object. A ray extends infinitely. If a new condition happens you should just remove the old irrelevant object and draw a new relevant one. To do this, just use the same tag name as the old object and it will replace the old one with a new one.
                Josh P.NinjaTrader Customer Service

                Comment


                  #23
                  swingmodified2.cs (16.6 KB, 40 views)
                  swingmodified2.cs gives an error on compiling,
                  Is it possible to correct it? I assume that the indicator will plot extended swing lines from the swing highs and lows to the current bar, ie all the way to Y axis.

                  Comment


                    #24
                    Have you found an easy solution to this Swing Indicator lines extending till Y axis? Would highly appreciate if you can share it if you have found it .

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Hwop38, 05-04-2026, 07:02 PM
                    0 responses
                    177 views
                    0 likes
                    Last Post Hwop38
                    by Hwop38
                     
                    Started by CaptainJack, 04-24-2026, 11:07 PM
                    0 responses
                    332 views
                    0 likes
                    Last Post CaptainJack  
                    Started by Mindset, 04-21-2026, 06:46 AM
                    0 responses
                    254 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by M4ndoo, 04-20-2026, 05:21 PM
                    0 responses
                    356 views
                    0 likes
                    Last Post M4ndoo
                    by M4ndoo
                     
                    Started by M4ndoo, 04-19-2026, 05:54 PM
                    0 responses
                    184 views
                    0 likes
                    Last Post M4ndoo
                    by M4ndoo
                     
                    Working...
                    X