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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        47 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        15 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        21 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X