Problem with Bot/Indicator on indices with allowed mini lots(0.1) contracts
Problem with Bot/Indicator on indices with allowed mini lots(0.1) contracts
03 Oct 2017, 16:07
Hello All,
Broker allow mini lots(0.1) on indices(DAX - Germany30) but Bot and custom indicator not a correctly work.
In code when iterate over open positions - position.Quantity and position.Volume both return 0(zero).
But in other accounts with minimal contract size 1 lot Indicator and Bot work correctly.
Spotware Support Team please Your comments...
Thanks.
Karen.
Replies
k_baghyan
03 Oct 2017, 17:38
Hi Panagiotis,
Thank You for quick reply.
Bot from built-in sets of cAlgo - Simple Martingale cBot - there are also use position.Quantity(Position interface) - this is just for example
Indicator is developed by me(I am software developer)
from Indicator code:
foreach (var position in Positions)
{
if (position.TradeType == TradeType.Buy && position.SymbolCode == Symbol.Code)
{
Total_Buy_Trades++;
Total_Buy_Price += position.EntryPrice * position.Quantity;
Total_Buy_Size += position.Quantity;
Buy_Profit += position.NetProfit;
}
else if (position.TradeType == TradeType.Sell && position.SymbolCode == Symbol.Code)
{
Total_Sell_Trades++;
Total_Sell_Price += position.EntryPrice * position.Quantity;
Total_Sell_Size += position.Quantity;
Sell_Profit += position.NetProfit;
}
}
Broker: Kawase
In mini lots allowed "mode" both Bot and Indicator not a work due to position.Quantity return 0(zero)...
But for account with min contract size 1 lot Bot&Indicator work correctly.
Thanks,
Karen.
@k_baghyan
PanagiotisCharalampous
05 Oct 2017, 12:54
Hi k_baghyan,
This is a known issue in cAlgo and should be fixed in the next major release.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
03 Oct 2017, 17:16
Hi k_baghyan,
Thanks for your post. Could you please let us know the broker and share a cBot and Indicator that will allow us to reproduce the problem?
Best Regards,
Panagiotis
@PanagiotisCharalampous