![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 times in 0 posts
|
Hello,
I have system using a trailing stop as follows: protected override void Initialize() { SetTrailStop("", CalculationMode.Ticks, 60, true); CalculateOnBarClose = true; } protected override void OnBarUpdate() { if () { EnterShort(DefaultQuantity, ""); } } I'd like to reverse the trailing stop, so that I would go long instead of short and when the trailing "stop" was hit, it would be a take profit. I can't think how I could do this, low-intermediate coding skills so thanks for your patience, Jeremy |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
jeremymgp,
If you did EnterShort() and had a short position and you called EnterLong() it will reverse you into a long position, cancel the original trailing stop, and finally place you in a new trailing stop that is in the appropriate direction.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trailing stop | gg80108 | Strategy Development | 6 | 03-20-2009 01:13 PM |
| Trailing Stop for Realised Profits? | John833 | Strategy Development | 2 | 12-12-2008 02:18 PM |
| Trailing stop | jonbig04 | ATM Strategies (Discretionary Trading) | 2 | 07-24-2008 11:40 AM |
| Trailing Stop | tc101 | Automated Trading | 3 | 06-03-2008 07:59 AM |
| NT 6.5 - Trailing stop not trailing | PocoDiablo | Miscellaneous Support | 3 | 03-19-2008 01:46 PM |