public interface IRiskManagementService
{
double CalculateBuyQty(double riskPercent, double stopLossPrice, double askPrice, double minimumQty, double maximumQty,
StopValueType stopValueType, out bool isLimitReached, out double currentRisk);
double CalculateSellQty(double riskPercent, double stopLossPrice, double bidPrice, double minimumQty, double maximumQty,
StopValueType stopValueType, out bool isLimitReached, out double currentRisk);
}
public enum StopValueType
{
Absolute,
Pips
}
}
Hi Sir! Excuse me, could you explain to me how to correctly place the code in CTrader? I copied and pasted it but when compiling it gave me an error (No algo source file was found in "New cBot.csproj") Is it possible that you can send a screenshot or something? Thank you!
ezequieltp97
07 May 2021, 17:17
RE: Risk Calculation Funcrion
ranjicgnr said:
Hi Sir! Excuse me, could you explain to me how to correctly place the code in CTrader? I copied and pasted it but when compiling it gave me an error (No algo source file was found in "New cBot.csproj") Is it possible that you can send a screenshot or something? Thank you!
@ezequieltp97