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 jxs_xrj, 01-12-2020, 09:49 AM
    6 responses
    3,290 views
    1 like
    Last Post jgualdronc  
    Started by Touch-Ups, Today, 10:36 AM
    0 responses
    7 views
    0 likes
    Last Post Touch-Ups  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    8 responses
    61 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by Option Whisperer, Today, 09:55 AM
    0 responses
    8 views
    0 likes
    Last Post Option Whisperer  
    Started by halgo_boulder, 04-20-2024, 08:44 AM
    2 responses
    24 views
    0 likes
    Last Post halgo_boulder  
    Working...
    X