Moving stop loss and issue backtesting NT7 - futures io
futures io futures trading



Moving stop loss and issue backtesting NT7


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one erk707 with 2 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 MXASJ with 1 posts (1 thanks)
    4. looks_4 NinjaTrader with 1 posts (0 thanks)
    1. trending_up 2,374 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Moving stop loss and issue backtesting NT7

(login for full post details)
  #1 (permalink)
Irvine, CA
 
Experience: Intermediate
Platform: Ninjatrader
Trading: Piano, ES, GC, CL, NQ, 6E
 
Posts: 21 since Feb 2011
Thanks: 5 given, 4 received

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.

Started this thread Reply With Quote

Journal Challenge February 2021 results (so far):
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(170 thanks from 31 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(116 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(31 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #3 (permalink)
Asia
 
Experience: Beginner
Platform: NinjaTrader, TOS
 
Posts: 798 since Jun 2009
Thanks: 109 given, 799 received


What timeframe are you testing on? You will probably want to test on 1 tick time frame and if your trade logic uses a higher timeframe you would add a second dataseries.

Reply With Quote
The following user says Thank You to MXASJ for this post:
 
(login for full post details)
  #4 (permalink)
Irvine, CA
 
Experience: Intermediate
Platform: Ninjatrader
Trading: Piano, ES, GC, CL, NQ, 6E
 
Posts: 21 since Feb 2011
Thanks: 5 given, 4 received

Testing on a 3 range bar. Everything works fine until I try to set the stop loss at the same price as entry price. Then backtesting goes crazy and just enters then exits. I have tried other time frame on your note but still same issue. Is there a function in NT7 for setting breakeven?

Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
 
NinjaTrader's Avatar
 
Posts: 1,569 since May 2010
Thanks: 184 given, 2,416 received


erk707 View Post
Testing on a 3 range bar. Everything works fine until I try to set the stop loss at the same price as entry price. Then backtesting goes crazy and just enters then exits. I have tried other time frame on your note but still same issue. Is there a function in NT7 for setting breakeven?

Try changing the stop loss price to the entry price on the bar after you have entered.

Follow me on Twitter Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Moving stop loss and issue backtesting NT7


Last Updated on April 20, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1500 prizes from Topstep!

February
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts