• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Swing Lag?

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

    Swing Lag?

    Hi,

    Can somebody please verify the following code will return the bar # of the LAST swing (high)?? I seem to be seeing a "lag" of greater than the 5 bars that I would expect...

    HI_PERIOD = Swing(5).SwingHighBar(0, 1, CurrentBar);

    #2
    The "lag" should be as long as the period. I am only seeing a period lag on my end.

    See my attached indicator for expected behavior output.
    12/18/2007 5:00:00 PM SwingHighBar: 25 SwingHigh: 183.5
    12/19/2007 2:41:00 AM SwingHighBar: 26 SwingHigh: 183.5
    12/19/2007 2:42:00 AM SwingHighBar: 27 SwingHigh: 183.5
    12/19/2007 2:45:00 AM SwingHighBar: 28 SwingHigh: 183.61
    12/19/2007 3:03:00 AM SwingHighBar: 6 SwingHigh: 183.61
    12/19/2007 3:04:00 AM SwingHighBar: 7 SwingHigh: 183.61
    12/19/2007 3:05:00 AM SwingHighBar: 8 SwingHigh: 183.61
    12/19/2007 3:08:00 AM SwingHighBar: 9 SwingHigh: 183.61
    12/19/2007 3:16:00 AM SwingHighBar: 10 SwingHigh: 183.61
    12/19/2007 3:17:00 AM SwingHighBar: 11 SwingHigh: 183.61
    12/19/2007 3:18:00 AM SwingHighBar: 12 SwingHigh: 183.61

    The SwingHighBar is only determined after 5 bars. We print on the 6th bar.
    Attached Files
    JoshNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sun0781, Today, 05:02 PM
    0 responses
    6 views
    0 likes
    Last Post sun0781
    by sun0781
     
    Started by ronhb107, 09-12-2019, 10:09 AM
    4 responses
    41 views
    0 likes
    Last Post Mr.Trader  
    Started by rwilliam, Today, 03:55 PM
    0 responses
    3 views
    0 likes
    Last Post rwilliam  
    Started by asmmbillah, Today, 03:42 PM
    2 responses
    8 views
    0 likes
    Last Post asmmbillah  
    Started by NT-Roland, Today, 03:25 PM
    0 responses
    7 views
    0 likes
    Last Post NT-Roland  
    Working...
    X