Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using the Swing Indicator To Enter Positions

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

    Using the Swing Indicator To Enter Positions

    I know how to use most indiactors to trigger entry or exits but i'm having a hard time configuring the Swing High/low indicator to enter positions.

    What i'm trying to to do is enter a position when a swing high is crossed over or vice vesa. Does anone know how to do this?

    Thanks

    M

    #2
    Hi MJUK10,

    Thank you for your post.

    You can try something like this under OnBarUpdate()

    if (CrossAbove(High, Swing(5).SwingHigh, 1))
    {
    "action"
    }

    You'll have to play with the lookback period, I chose 5 at random, but this may need to be set to a variable value.
    TimNinjaTrader Customer Service

    Comment


      #3
      Thanks Tim.

      On to the next problem! lol.

      I do not want to trade this system on Wednesdays and, therefore, I don't want the back test to include Wednesdays.

      Is there an easy way of excluding Wednesdays and the occassional odd day i.e. Fed annoucement days.

      I was thinking I may have to compile a list of excluded days and set some kind of condition if the current day = excluded day. Any ideas?

      Thanks again.

      Comment


        #4
        Hi MJUK10,

        Please take a look at the following reference sample. That should get you on the right track.

        TimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        672 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X