Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Support and resistance

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

    Support and resistance

    I hope someone can help. In developing a strategy I want to consider location of support and resistance such as swing highs or OHLC or pivots. Let's say I have a 40 tick target on a long trade but if there is resistance such as a swing high less than 40 ticks away I don't want the trade to execute. When I put in the following condition "Close + 40 ticks < swing high" as one of the conditions to go long it seems to negate the trade but now no longs are generated on the chart at all. I tried other variations but can't seem to get it to work properly. HELP.

    #2
    Hello swaggerjim,

    Thanks for your post.

    I may suggest to check the Log tab of the Control Center and to run the strategy with Trace Orders to look for any reports that order submissions are ignored due to an internal rule of the Managed Approach. If you are hitting an internal rule, you may modify the strategy so it works in the context of these rules or use the Unmanaged Approach. It will also be important to check that you are not hitting any errors that are making the strategy abort.

    TraceOrders - https://ninjatrader.com/support/help...aceorders2.htm

    Managed Approach Internal Rules - https://ninjatrader.com/support/help...antedPositions

    Unmanaged Approach - https://ninjatrader.com/support/help...d_approach.htm

    If you see that you are not hitting any errors and the strategy is not aborting, there must be a logical issue with the strategy where the order submissions are not firing. I would then suggest to find the first place on your chart where you expect the trade, and then to use the Data Box to view the Bar Indexes for the chart bars. You can use this information to add debugging prints that will only print when the CurrentBar equals the index you want to investigate. The prints should consist of the values used to evaluate your conditions before the condition gets evaluated. This will tell you why some condition is not becoming true so it can be easier to correct and make sure it is working as you expect.

    Debugging tips - https://ninjatrader.com/support/help...script_cod.htm

    If you have any specific questions on an internal rule or with setting up debugging prints, please let us know.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    89 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    135 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    69 views
    0 likes
    Last Post PaulMohn  
    Working...
    X