The SetTrailStop() method can NOT be used concurrently with the SetStopLoss() method for the same position, if both methods are called for the same position (fromEntrySignal) the SetStopLoss() will always take precedence. You can however, use both methods in the same strategy if they reference different signal names.
Last edited by max-td; November 30th, 2009 at 08:13 AM.
The following 3 users say Thank You to max-td for this post:
Also, especialy for beginners, i recommend the NinjaTrader- online-events
to do the first steps into creating strategys with the NT-wizard :
Automated Strategy Developement :
What: Software Training Session When: Usually once per week Online Trading. NINJATRADER. Online events. Duration: Approximately 60 mins Cost: Free to everyone
Develop your strategy concept, construct it, historically test it, optimize it, simulation test it and then live deploy it through your live brokerage account with NinjaTrader’s strategy development tools. This session is designed to provide a high-level overview of the following areas:
Create a strategy in the Strategy Wizard
Create entry and exit conditions and invoke actions
Plan to attend this session if you want to maximize your efficiency in utilizing NinjaTrader for automated strategy development. After completing the Automated Strategy Development Level I training session, you will:
Know the process for constructing a strategy using the Strategy Wizard
Know how to create entry and exit conditions
Know how to backtest a strategy
Know how to view the performance results of a backtested strategy
Participation is free so please attend if you are a first-time visitor, new user or an existing user. These sessions are always informative and keep you up-to-date on any enhancements and features we add to our strategy development features.
Max, do you (or anyone else) have a sample strategy that doesn't use fixed tick trailing stops?
Also, how do you keep track of profit/loss within the strategy to perhaps change nr. of contracts, ratio of profit-to-loss etc.?
Also, does anyone have a good example of a multiple entry and exit strategy?
I must confess I have been stumped/frustrated by the brevity and simplicity of the examples provided and also the lack of shared strategies anywhere just to have a basic template with most of the above (and other) options to key off of. If you don't know C+ coding, the error messages are very hard to figure out so I have tended to stay away. But now I want to use strategies to test key ideas even if I don't particularly want to run them for generating income. Working only in indicators is too complicated at this point and really doesn't work for testing purposes.
Platform: NinjaTrader, TOS, Multicharts, Open Source various
Favorite Futures: FDAX, cable/yen, FX, options on commodities
Posts: 66 since Jun 2009
Thanks: 16 given,
Is it possible to use all three in the same strategy? I have put stopLoss, trailStop and profitTarget in some strategies but when I backtest the trail stop doesn't take effect. When I check the entries and exits on the chart it looks like the stop loss is taking effect but the profit target and trail stop are ignored. Does that make sense to you? I'll post my code later on if you'd like to take a look?