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
TS Super Trend / Out of Sync / Too Many Entries
Collapse
X
-
TS Super Trend / Out of Sync / Too Many Entries
I made a very simple TS Super Trend strategy that reverses when there is a change from uptrend to downtrend, and has a set stop loss. It back test well but when I run it live it keeps getting out of sync and taking more positions than it is suppose to. Can anyone help me figure out what the problem is? (I am not a coder).Tags: None
-
Hello williamsjpw3,
Based on the description it sounds like you may be seeing one of the normal differences from historical and realtime. Are you running the script OnEachTick or OnPriceChange in realtime? If so that would not match the historical tests which use OnBarClose so that would cause differences.
Generally to answer this type of question would require that you debug the script to see why the conditions you made are happening differently between tests. A good way to approach that is to use Print(""); statements to output what the script is doing
Have you at this point tried to use prints to see how your logic is run in each test?
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Comment
-
Hello williamsjpw3,
If you are using the builder the print would be in the actions under the misc folder. You could use that to print when a condition is true to get a better idea of how frequently its happening. The output from that goes to the New -> NinjaScript output window.
When using an indicator in your condition you may need to review what values the strategy is seeing to better understand why it is taking more/less trades than it should be. Outputting the values of the indicator by using a print is one way to do that.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by judysamnt7, 03-13-2023, 09:11 AM
|
4 responses
59 views
0 likes
|
Last Post
by DynamicTest
Yesterday, 08:25 PM
|
||
Started by ScottWalsh, Yesterday, 06:52 PM
|
4 responses
36 views
0 likes
|
Last Post
by ScottWalsh
Yesterday, 07:40 PM
|
||
Started by olisav57, Yesterday, 07:39 PM
|
0 responses
7 views
0 likes
|
Last Post
by olisav57
Yesterday, 07:39 PM
|
||
Started by trilliantrader, Yesterday, 03:01 PM
|
2 responses
22 views
0 likes
|
Last Post
by helpwanted
Yesterday, 07:25 PM
|
||
Started by cre8able, Yesterday, 07:24 PM
|
0 responses
10 views
0 likes
|
Last Post
by cre8able
Yesterday, 07:24 PM
|
Comment