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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    89 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X