NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > Application Technical Support > ATM Strategies (Discretionary Trading)

ATM Strategies (Discretionary Trading) Support for Advanced Trade Management, AutoTrail, AutoBreakeven, Stop Strategy and Simulated Stops etc...

Reply
 
Thread Tools Display Modes
Old 03-16-2008, 05:45 PM   #1
monpere
Senior Member
 
Join Date: Dec 2007
Posts: 310
Thanks: 0
Thanked 5 times in 3 posts
Default GetProfitLoss()

GetProfitLoss() does not have a PerformanceUnit.Ticks parameter. I would like to track running profit on a tick basis, do I have to do it based by deriving ticks from PerformanceUnit.Points ? Is there a generic way to do that calculation so that it works on any security?
Last edited by monpere; 03-16-2008 at 06:14 PM.
monpere is offline  
Reply With Quote
Old 03-16-2008, 07:33 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

There is no PerformanceUnit.Ticks right now. You will have to roll your own calculations. Use TickSize and Instrument.MasterInstrument.Pointvalue to do your math.
NinjaTrader_Josh is offline  
Reply With Quote
Old 03-21-2008, 03:46 PM   #3
monpere
Senior Member
 
Join Date: Dec 2007
Posts: 310
Thanks: 0
Thanked 5 times in 3 posts
Default

Will there be PerformanceUnit.Ticks in the future? because you cannot calculate it using Instrument.MasterInstrument.Pointvalue without knowing the number of ticks per point, and that's different for each instrument. I don't want to have to code instrument names in my strategy. This must have been an oversight in your original design.

Quote:
Originally Posted by Josh View Post
There is no PerformanceUnit.Ticks right now. You will have to roll your own calculations. Use TickSize and Instrument.MasterInstrument.Pointvalue to do your math.
monpere is offline  
Reply With Quote
Old 03-21-2008, 11:18 PM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

>> Will there be PerformanceUnit.Ticks in the future?
Unfortunately there is no ETA yet.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 03-22-2008, 07:14 AM   #5
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

How about?

Total Ticks = Total Points / TickSize
NinjaTrader_Ray is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
v6.5.0.4 BETA Position.GetProfitLoss/Position.GetProfitLoss method fault Aussie2 General Programming 1 12-25-2007 11:25 PM
Position.GetProfitLoss(Close[0], PerformanceUnit.Points) problems scriabinop23 Strategy Development 2 05-18-2007 12:22 PM


All times are GMT -6. The time now is 04:07 AM.