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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        51 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        142 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        275 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X