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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X