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 argusthome, Yesterday, 10:06 AM
        0 responses
        17 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        16 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        9 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        36 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X