I am struggling with the use of these two broker statements.
I have code that is trying to pyramid into a position after a certain number of days in the existing trade.
Having done the logic to test for this condition and also calculated a new stop for the pyramid entry - which broker statement do I use?
In the help it states that broker.AdjustPositionOnOpen requires the use of a factor that adjusts the existing position size accordingly (AdjustPositionOnOpen( adjustmentFactor )).
What if I am using my standard money management algorithm to size the position increment and size is therefore calculated in the money manager? Can I use AdjustPositionOnOpen without the risk adjustment argument and the size will be determined by the money manager?
Also how would I set the stop using this command? I think this answer is instrument.SetExitStop (unitnumber, stopprice)…
I have used broker.EnterLongOnOpen (stopprice) in the current code but I am not sure this is working correctly. [for shorts I have used broker.EnterShortOnOpen]
Help much appreciated...
broker.AdjustPositionOnOpen vs broker.EnterLongOnOpen
-
- Roundtable Knight
- Posts: 127
- Joined: Wed Dec 31, 1969 7:00 pm
- Location: London, England and Cape Town, South Africa