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
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ntbone, Today, 02:30 PM
    0 responses
    4 views
    0 likes
    Last Post ntbone
    by ntbone
     
    Started by tuliomgui, Yesterday, 10:07 PM
    3 responses
    13 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by Learner Trader, Today, 08:36 AM
    1 response
    24 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by GeorgeW, Today, 03:15 AM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by timko, Today, 11:55 AM
    4 responses
    11 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Working...
    X