TAJTrades
06-20-2010, 06:28 AM
I am trying to create a little Indicator Script that will substitute NT's "Plot execution | TextandMarker" chart option with a Line drawn on the chart showing Trade Entry and Trade Exit. I do not auto trade so using a Strategy File may not be the answer.
I tried using the Help File example for "MarketPosition" and get the following Error:
Indicator\TradeTracker.cs An object reference is required for the non-static field, method, or property 'NinjaTrader.Cbi.Position.MarketPosition.get' CS0120 - click for info 53 10
I tried using the Help File Example for "IPosition " and get the following Error:
Indicator\htcTradeTracker.cs 'NinjaTrader.Indicator.htcTradeTracker.OnPositionU pdate(NinjaTrader.Cbi.IPosition)': no suitable method found to override CS0115 - click for info 36 25
Are "MarketPosition" and "IPosition" only allowed in Strategy Files? If so, how can I get around this. Or what am I missing to access Trade Data from within an Indicator File? Have I missed a Using Declaration?
Thanks.
I tried using the Help File example for "MarketPosition" and get the following Error:
Indicator\TradeTracker.cs An object reference is required for the non-static field, method, or property 'NinjaTrader.Cbi.Position.MarketPosition.get' CS0120 - click for info 53 10
I tried using the Help File Example for "IPosition " and get the following Error:
Indicator\htcTradeTracker.cs 'NinjaTrader.Indicator.htcTradeTracker.OnPositionU pdate(NinjaTrader.Cbi.IPosition)': no suitable method found to override CS0115 - click for info 36 25
Are "MarketPosition" and "IPosition" only allowed in Strategy Files? If so, how can I get around this. Or what am I missing to access Trade Data from within an Indicator File? Have I missed a Using Declaration?
Thanks.