![]() |
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
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jul 2009
Posts: 53
Thanks: 0
Thanked 0 times in 0 posts
|
I need to write an indicator that searches for different conditions once a trade has been entered.
How do I do this? Thru the Performance.RealtimeTrades.Count ? |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Performance does not return you things until your trade is complete. If you want to do things from when you enter a trade you would want to detect changes in Position.MarketPosition and Position.Quantity to determine that you have entered a trade.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jul 2009
Posts: 53
Thanks: 0
Thanked 0 times in 0 posts
|
Think I got it.
My indicator has to poll the Position object for changes. or I could implement : The OnPositionUpdate() method |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Choosing PriceType Programatically? | darckeen | Indicator Development | 5 | 01-15-2011 08:38 PM |
| programatically set stop /strategy | junkone | Strategy Development | 1 | 04-30-2009 05:38 AM |
| Determine trade size in real-time and backtest | tomace | Strategy Development | 2 | 04-29-2009 04:43 PM |
| Export Data Grid Programatically? | mktrend | General Programming | 10 | 01-05-2009 10:07 AM |
| Programatically Change To Sim | CashCache | Strategy Development | 3 | 03-10-2008 09:55 PM |