SmartQuant Discussion

Calling current positions
Page 1 of 1

Author:  azuric [ Tue Jul 31, 2012 3:08 pm ]
Post subject:  Calling current positions

How do you call the current position (quantity and price) from within oq?
Is this position solution based or strategy based?and can it be affected by any other strategies that involve the same instrument?

Author:  Dr. Anton Fokin [ Tue Jul 31, 2012 9:42 pm ]
Post subject:  Re: Calling current positions

In your strategy you can write

if (HasPosition)
Console.WriteLine("Current position qty = " + Position.Qty);

Basically Strategy.Position is the property that provides access to your current position in Strategy.Instrument

Author:  azuric [ Wed Aug 01, 2012 10:26 am ]
Post subject:  Re: Calling current positions

great thanks for that

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group