Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

equivalent function for "swinghighbar"

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

    equivalent function for "swinghighbar"

    hello, I'm trying to translate from Easy Language to Ninja Script, in EL the function “swinghighbar” return the number of bars ago a swing high occurred.

    what is an equivalent function in NT8?

    thanks

    #2
    Hello futuros,

    Thanks for your post.

    You would need to use the Swing indicator and use the following methods syntax from the help guide:

    Syntax - Bars Ago
    High Bar
    Swing(int strength).SwingHighBar(int barsAgo, int instance, int lookBackPeriod)
    Swing(ISeries<double> input, int strength).SwingHighBar(int barsAgo, int instance, int lookBackPeriod)

    Low Bar
    Swing(int strength).SwingLowBar(int barsAgo, int instance, int lookBackPeriod)
    Swing(ISeries<double> input, int strength).SwingLowBar(int barsAgo, int instance, int lookBackPeriod)

    Return Value
    An int value representing the number of bars ago. Returns a value of -1 if a swing point is not found within the look back period.


    Please be sure to review the complete swing help guide here: https://ninjatrader.com/support/help...nt8/?swing.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    213 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    126 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    145 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    229 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    190 views
    0 likes
    Last Post CarlTrading  
    Working...
    X