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!
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
NinjaTrader
Support and resistance
Collapse
X
-
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.Tags: None
-
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
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Lele2k24, Yesterday, 11:24 AM
|
10 responses
31 views
0 likes
|
Last Post Today, 01:04 PM | ||
Started by Padan, Today, 02:02 AM
|
7 responses
19 views
0 likes
|
Last Post Today, 12:59 PM | ||
Started by Adam Klaus, 03-26-2024, 07:43 PM
|
2 responses
22 views
0 likes
|
Last Post
by mcosta72
Today, 12:54 PM
|
||
Started by spottysallrite, Today, 11:31 AM
|
4 responses
10 views
0 likes
|
Last Post Today, 12:53 PM | ||
Started by cozypinto, 12-22-2023, 10:13 AM
|
4 responses
94 views
0 likes
|
Last Post
by Harvard
Today, 12:50 PM
|
Comment