I get often frustrated by undocumented NT quirks which cause(d) me to waste a lot of time trying to find solutions.
Solutions which are often known to the more experienced coders, who are thus pestered for the same answers time and time again. So I'll you this thread to list issues and solutions I encounter(ed).
Thanks to all who helped me to the right solutions/answers.
I hope you will not be offended if I won't mention those who provided the answers.
From some issues I even honestly don't know it anymore.
It is just a friendly help from one code amateur to the next beginner.
Last edited by Peter; June 12th, 2009 at 07:08 AM.
The following user says Thank You to Peter for this post:
I can think of a bunch of things to add to this thread, as they come up I will do so.
One thing that isn't entirely a quirk but still an issue/important is to always view your Log tab if you are having any "weird" stuff go on. I can't tell you how many times I was backtesting strategies for hours and getting odd results, only to look at my Log tab and find a slew of OutOfMemory.Exception errors. Ninja had kept quiet about them except for the log.
The log tab is very handy for a variety of other things too when writing new code.
Solution: Open the indicator (toools -> edit -> indicator) and look for the line
Change 'false' to 'true' and recompile.
Tht is all ... you should now have the choice when using the indicator.
BTW It is always wise to make a backup before editing such stuff.
I never use long and short in the same strategy anymore.
I separated all my previous strategies with combined long/short strategies into one strategy for long and a separate strategy for short.
There are potential issues that did cost me !!
1 - It is easier and faster to run optimizations.
2 - Sometimes your broker might not have shares to short and rejects the order. NT will then stop the strategy.
If you have long and short separated .... at least the long strategy will keep working.
3 - Potential 'overfills'
Assume you are long in a combined long/short strategie. To get out of the long you have both an 'EnterShort' rule and an 'ExitShort' rule with different parameters. The 'ExitShort' is in the strategy to exit the strategy long position before the circumstances were met to enter a short.
I found that at times the (speed of the) price development triggered both rules in the same bar, triggering both ExitLong and EnterShort at the same time...... the effect was that NT puts me in a double short position.
I had 'entries per direction=1' and 'statements to check for Position.Long or Short' in my strategy but they were not able to prevent overfills.
Also this issue does not show up in backtesting or optimizing.
The internal order handling rules in NT should prevent your strategy to enter a second position short (if you set entries per direction =1), but apparently this does not always work. After some Emails NT told me:
"Overfills are always a possibility. The Internal Order Handling Rules are in place to reduce the overfill scenarios, but it does not 100% remove them(emphasis added). Also, since you are using market orders, the rules do not apply. You should become familiar with these risks as they generally govern things like overfills. "
I was aware of the text at the link above in the manual, but as NT beginner I apparently did not yet fully appreciate certain texts in the manual. For more details see here