Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dynamic Support/Resistance

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

    Dynamic Support/Resistance

    Attached below is an indicator that a friend coded it works great but I'm having 2 problems. Maybe someone could have a look.

    1. for ver 6 it sometimes will plot on volume chart other times it does nothing . Works fine on min charts.


    problem#2. I have tryed applying to ver6.5 some days on min charts it has to start plotting all over from start of session won't keep previous sessions on chart, other days it is fine. Vol charts same problem as above.

    Weird Stuff

    Thanks for any help,
    Al
    Attached Files

    #2
    There's a line at the start of the indicator that does some funky stuff checking for dates. It causes the indicator to return nothing if it doesn't meet it's requirements.
    Code:
             if ( CurrentBar < 1 || (ToDay(Time[0]) == ToDay(Time[CurrentBar])))	return;
    This is why your indicator is not plotting ..
    I'm not sure what it's trying to do .. but It looks like it's trying to limit plots to only today.

    If so, You will want to review http://www.ninjatrader-support.com/v...ead.php?t=3226

    Or .. just temporarily remove that line of code by editing the indicator and removing that line of code to see if that fixes your problem.

    Comment


      #3
      Zoltran,
      Thanks for your suggestion. I tryed it this morning and still does not plot on ver 6 vol charts.
      Perhaps another Ninja Expert has a suggestion.

      Thanks,
      Al

      Comment


        #4
        Take a look at the bottom tip .. re null references to see why your indicator doesn't plot.


        Your code looks back 2 bars ..(see HMA(period)[2]) . so it needs to 'skip' at least 2 bars of the chart data. If it doesn't .. it gets an error and will not chart.

        The 1st line of your program checks for Currentbar <1 .. this needs to be at least 2, similar to the line below. I tested this and it works fine.


        if ( CurrentBar < 5 || (ToDay(Time[0]) == ToDay(Time[CurrentBar]))) return;

        Or .. if you want to eliminate the time of day logic .
        if ( CurrentBar < 5 ) return;

        fwiw ...
        This is a common problem and there are many hits in the forum with the answer. You can search yourself, and maybe get a quicker answer to your problems in the future.
        And .. in NT 6.5 you would have seen an error msg on the LOG tab telling you what the problem was.

        Comment


          #5
          Zoltran,

          Thanks that was the fix for v6.

          Ver 6.5 still won't keep the indicator on volume charts from previous day, starts painting new indicator.

          Merry Christmas,
          Al

          Comment


            #6
            As I mentioned .... the logic to check time of day looks odd. I suspect that is part of your problem. I'm not sure what the goal, or desired behavior should be.

            You'll need to find the author of this indicator and have them update it.

            Comment


              #7
              I have updated your code.

              It works on Volume, Tick and Minutes. Had one graph where I had to 'Reload historical Data' but afterwards was fine.

              In addition to the other comments you have recieved there was an error with your (ToDay(Time[0]) statement as it was effectively saying "if 1=1"

              Sunrise
              Attached Files
              Last edited by Sunrise; 01-20-2008, 02:48 PM.

              Comment


                #8
                Sunrise,

                What is this . Ntns file type? Could you please zip it, so I can import to Ninja.

                Thanks, Al

                Comment


                  #9
                  ntns is the new file export extension on NT6.5.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    And how do we get it into Ninja 6.5 since the Import utility is looking for a .zip file?

                    Comment


                      #11
                      Sunrise,

                      Could you repost with the latest NT version which will product a ZIP?

                      Thanks in advance.
                      RayNinjaTrader Customer Service

                      Comment


                        #12
                        Unfortunately not.

                        you see after I created the export file I removed it from my NT, on the belief that if needed I could reimport it - but no. I have to say that Ninja programmers really did not think hard before they reverted back to the old zip method - why could they not still allow the ntns to be imported?

                        Perhaps I can just change the name from .ntns to .zip?

                        So unless someone has an earlier version that had the strange labelling facility this is now lost.


                        Sunrise

                        Comment


                          #13
                          Yes, renaming the file extension likely would do the trick. Its still a zip file.
                          RayNinjaTrader Customer Service

                          Comment


                            #14
                            To confirm, renaming back to zip works fine.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              If that's the case then this should work.

                              Good to know this for other items stuck with ntns extension.

                              Sunrise
                              Attached Files

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by r68cervera, Today, 05:29 AM
                              0 responses
                              2 views
                              0 likes
                              Last Post r68cervera  
                              Started by geddyisodin, Today, 05:20 AM
                              0 responses
                              3 views
                              0 likes
                              Last Post geddyisodin  
                              Started by JonesJoker, 04-22-2024, 12:23 PM
                              6 responses
                              35 views
                              0 likes
                              Last Post JonesJoker  
                              Started by GussJ, 03-04-2020, 03:11 PM
                              12 responses
                              3,239 views
                              0 likes
                              Last Post Leafcutter  
                              Started by AveryFlynn, Today, 04:57 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post AveryFlynn  
                              Working...
                              X