i try a simple code with a stop calculation.mode percent
i would like to optimize the percent of the stop, but i don't know how to do it.
when i write :
#region Varaibles
privateint stop = 1;
OnBarUpdate
SetStopLoss("X pourcent", CalculationMode.Percent, stop/100, false);
it is not working... when a trade is initiated, it is directly stopped
if i write
#region Varaibles
privateint stop = 0.01;
it is not working as well (error CS0266)
In the 2 cases on the #region Properties i write
[Description("stop en pourcentage")]
[GridCategory("Parameters")]
publicint Stop
{
get { return stop; }
set { stop = Math.Max(1, value); }
}
can you help ?
thx
Comment