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

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.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ghoul, Today, 06:02 PM
    0 responses
    7 views
    0 likes
    Last Post ghoul
    by ghoul
     
    Started by Barry Milan, Yesterday, 10:35 PM
    6 responses
    18 views
    0 likes
    Last Post Barry Milan  
    Started by DanielSanMartin, Yesterday, 02:37 PM
    2 responses
    13 views
    0 likes
    Last Post DanielSanMartin  
    Started by DJ888, 04-16-2024, 06:09 PM
    4 responses
    13 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by terofs, Today, 04:18 PM
    0 responses
    12 views
    0 likes
    Last Post terofs
    by terofs
     
    Working...
    X