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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Giudiver, 07-10-2020, 04:29 PM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by rtwave, Today, 04:11 PM
    0 responses
    2 views
    0 likes
    Last Post rtwave
    by rtwave
     
    Started by asmmbillah, Today, 03:03 PM
    0 responses
    4 views
    0 likes
    Last Post asmmbillah  
    Started by timemeantnothing, Today, 02:40 PM
    0 responses
    5 views
    0 likes
    Last Post timemeantnothing  
    Started by magnatauren, Today, 02:20 PM
    0 responses
    7 views
    0 likes
    Last Post magnatauren  
    Working...
    X