![]() |
|
|||||||
| Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
|
I am looking to plot this data in realtime. Where do I get these figures? Which object do i Call?
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Oil_Trader,
The Set() methods do not return IOrder objects. To track where they are you would need to create your own variable to match their values right as you submit the Set() method. So for instance if the Set() value is 10 ticks below entry price, you can create your own double variable and have it equal to Position.AvgPrice - 10 * TickSize.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
|
How do I pass the close[0] value back to the "plotline indicator" when the price was triggered?
Can i place this inside the OnBarUpdate within the strategy? Line.Set(Close[0]);
Last edited by Oil_Trader; 09-19-2010 at 02:51 PM.
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Not sure I follow what your requirement is to pass it back. If you want to set it, you should instead go to the indicator and modify the indicator logic to implement this directly.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Aug 2010
Location: http://twitter.com/Oil_Trader
Posts: 141
Thanks: 0
Thanked 0 times in 0 posts
|
Yes but I need the execution price at Close[0]...how do I set that for the indicator value?
|
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Oil_Trader,
You should not be setting values back to an indicator. The relationship should be one direction. If you absolutely need this type of logic, please see this reference sample: http://www.ninjatrader.com/support/f...ead.php?t=6651
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Plot line for Stoploss | billr | Strategy Development | 1 | 08-09-2010 01:36 PM |
| Get StopLoss/ProfitTarget from order | symphys | Strategy Development | 5 | 05-24-2010 11:33 AM |
| Stoploss and Profittarget Problem | thunderbolt78 | General Programming | 13 | 03-04-2010 05:14 AM |
| How to set ProfitTarget and Stoploss as (open price+x) and (open price -x) | SuperDriveGuy | Strategy Analyzer | 4 | 03-19-2009 02:19 AM |
| ProfitTarget | jriverac | Strategy Development | 8 | 05-06-2008 04:10 PM |