Been doing some FOREX exploration over the weekend. Trying to average down a position doesn't seem to let me adjust the trade size from the current system defaults. In the strategy properties I have set trade size to 2 million with a base size of 50, 000.
Code: Select all
private IOrderPriced buyOrder;
...
...
protected override void Create()
{
buyOrder = OrderCreator.Limit(new SOrderParameters(EOrderAction.Buy, "GStat_LE"));
}
...
...
protected override void CalcBar()
{
if (StrategyInfo.MarketPosition > 0)
{
buyOrder.Send(CurrentPosition.OpenTrades[CurrentPosition.OpenTrades.Count - 1].EntryOrder.Price - 0.002, CurrentPosition.OpenLots);
}
}
Hope this explains my situation OK.
Version 8.5 build 6862
With kind regards,
MK