Profile Picture

AddToPosition and BarsValid

Posted By xzajic2 7 Years Ago
Message
Posted Saturday September 25 2010
I'm using "position averaging", so in my code is something like
PositionManager.AddToPosition(myposition.ID, shares, OrderType.Limit, Close.Current, "Pyramide 1")

However, such order is valid for 1 bar only (!). I need (say) GTC. Is it sufficient to write
Dim myOrder as Order = PositionManager.AddToPosition(myposition.ID, shares, OrderType.Limit, Close.Current, "Pyramide 1")
myOrder.BarsdValid = -1
?
Seems ok in paperbroker...
Posted Sunday September 26 2010
This will work. You can also create your own OrderSettings object, set all the properties you want, and call Position.SubmitOrder().

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems