![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Sep 2008
Posts: 14
Thanks: 0
Thanked 0 times in 0 posts
|
Hi... yes... It's me another time...
What you think is going wrong in this strategy? exitShortStop doesn't works, why? ///<summary> /// Called on each bar update event (incoming tick) ///</summary> protectedoverridevoid OnBarUpdate() { // Condition set 1 if (GetHighLowByTimeRange(10, 15, 9, 30).LowestLow[0] != GetHighLowByTimeRange(10, 15, 9, 30).LowestLow[1]) { EnterShortStop(DefaultQuantity, GetHighLowByTimeRange(10, 15, 9, 30).LowestLow[0] + -1 * TickSize, ""); } // Condition set 2 if (Position.MarketPosition == MarketPosition.Short && BarsSinceEntry() > 1) { ExitShortStop((Position.AvgPrice) * (1 + Stop), "", ""); } } Thanks a lot. |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
For orders you feel that don't work the first step is to use TraceOrders = true along with Print() to determine if you are submitting valid stop prices. Please see these two articles: http://www.ninjatrader-support.com/v...ead.php?t=3418
http://www.ninjatrader-support.com/v...ead.php?t=3627
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SetProfitTarget works incorrectly | mike8943 | Strategy Development | 8 | 02-28-2008 03:25 PM |
| Program works on 6.0 not 6.5 | 123r34 | General Programming | 2 | 02-17-2008 07:36 AM |
| Indicator Works on one PC but not another | nolantx | Indicator Development | 7 | 12-20-2007 12:12 PM |
| Does NT V6 works with Windows 2000? | Paolo333 | Installation and Licensing | 3 | 05-07-2007 08:22 AM |
| Automated Trading Code no longer works | werosen | Automated Trading | 3 | 06-15-2006 05:59 AM |