Irvine, CA
Experience: Intermediate
Platform: Ninjatrader
Trading: Piano, ES, GC, CL, NQ, 6E
Posts: 21 since Feb 2011
Thanks Given: 5
Thanks Received: 4
|
I have an issue with a strategy I wrote and backtesting in NT7. Its pretty simple but I do not know what I did wrong. Basic example would be I enter a position and have a stop loss of 5 ticks. Once I have gained 5 ticks of profit I want to move the stop loss 5 ticks to the entry point of the trade to protect against loss. When I move to the entry point or any place past the entry point backtesting fails and shows that I am just entering and exiting at the same time. If I specify that when I gain 5 ticks of profit I want to move the stop loss say 4 tick only(something greater than the entry point of the trade) everything works fine. Time doesnt seem to matter, but the moment I try to move the stop to or past the entry price backtesting breaks down and just shows that I win all trades but all its really doing is entering and exiting simotaneously. Is it a common error with NT7, I was thinking of just writing my own code that creates a will say "take profit" stop loss so I can write to the log and view. The problem with the log is if a stop loss is hit no signal is recorded. Any way around this? Or do I have to write my own take profit and then close all other positions.
Any help would be much appreciated.
|