Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy swing entry / exit does not match swing indicator

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

    Strategy swing entry / exit does not match swing indicator

    I have seen posts about this before. I have created 1-minute strategy two scalp short at the top of the swing indicator for either 4 ticks or 8 ticks, depending on range. Which one is a user-selected variable. I set the variable based on a combination of the day's P&L using the Strategy Analyzer for the day so far, but also visually, looking at price action around the prior swing highs and low. The problem is, the swing high and lows in the strategy does not match the swing highs and lows on the chart. The swing highs and lows on the strategy are more sensitive than those on the charts, often reversing the trade at levels I did not intend. This affects the profitability of the strategy.

    1. How can I adjust for this? Change the swing strength in the strategy to attempt to match the swing on the cart?

    2. I assume if I run the Strategy Optimizer to test which target is working best for current conditions, the results are based on the swing levels in the strategy, and not on the indicator?

    Thanks-
    Rick
    OneMinSwingIndScalpCloseOnRevC345StartNow.zip

    #2
    Hello Rick,

    Thank you for your post.

    I actually just replied back to your email a few minutes ago - so you'll want to check that as it contains the information I'm going to post here plus some other answers.

    As far as the Swing indicator goes, the strategy builder only has access to the SwingHigh or SwingLow values, relative to the bars ago value selected. This is going to affect where your entries happen. To understand and visualize what the strategy builder is using you can create a set that draws an object (such as a dot, arrow, square, etc) at the current bar value of the SwingHigh or SwingLow.

    I've attached an example of this in a strategy builder strategy you can test with. It will show the swing indicator on the chart (with the normal dots) and will add up/down triangles to show where the code identifies the swing high and low. (I've offset the triangles by 2 ticks up or down to show them more clearly as otherwise they would be at the same price level as the swing dots and would be obscured where they overlap) The (time) difference between the dots and triangles is the number of bars of the strength setting (7 by default) and this is an important concept to understand when using the swing indicator in a strategy.

    I think this might help quite a bit with figuring out when things will occur — the dots in the Swing indicator are a bit misleading since they get redrawn after the fact.

    Please let us know if we may be of further assistance to you.
    Attached Files
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by f.saeidi, Today, 11:02 AM
    1 response
    2 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by geotrades1, Today, 10:02 AM
    4 responses
    12 views
    0 likes
    Last Post geotrades1  
    Started by rajendrasubedi2023, Today, 09:50 AM
    3 responses
    16 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by lorem, Today, 09:18 AM
    2 responses
    11 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by geddyisodin, Today, 05:20 AM
    4 responses
    30 views
    0 likes
    Last Post geddyisodin  
    Working...
    X