изменение стопов
test / deploy_trader_prod (push) Successful in 6m4s
Details
test / deploy_trader_prod (push) Successful in 6m4s
Details
parent
69660230c2
commit
ab4375489a
|
@ -1197,26 +1197,26 @@ INewPrice message, int windowMaxSize, decimal? uptrendStartingDetectionMeanfullS
|
||||||
private (decimal stopLoss, decimal takeProfit) GetStops(INewPrice message, PositionType type)
|
private (decimal stopLoss, decimal takeProfit) GetStops(INewPrice message, PositionType type)
|
||||||
{
|
{
|
||||||
var mode = TradingModes[message.Figi];
|
var mode = TradingModes[message.Figi];
|
||||||
decimal stopLossShift = 15;
|
decimal stopLossShift = 1.5m;
|
||||||
decimal takeProfitShift = 6;
|
decimal takeProfitShift = 6;
|
||||||
if (mode == TradingMode.Growing && type == PositionType.Long)
|
if (mode == TradingMode.Growing && type == PositionType.Long)
|
||||||
{
|
{
|
||||||
takeProfitShift = 15;
|
takeProfitShift = 15;
|
||||||
stopLossShift = 2;
|
//stopLossShift = 2;
|
||||||
}
|
}
|
||||||
if (mode == TradingMode.Growing && type == PositionType.Short)
|
if (mode == TradingMode.Growing && type == PositionType.Short)
|
||||||
{
|
{
|
||||||
stopLossShift = 2;
|
//stopLossShift = 2;
|
||||||
takeProfitShift = 2;
|
takeProfitShift = 3m;
|
||||||
}
|
}
|
||||||
if (mode == TradingMode.Stable && type == PositionType.Long)
|
if (mode == TradingMode.Stable && type == PositionType.Long)
|
||||||
{
|
{
|
||||||
takeProfitShift = 2.5m;
|
takeProfitShift = 3m;
|
||||||
}
|
}
|
||||||
if (mode == TradingMode.Stable && type == PositionType.Short)
|
if (mode == TradingMode.Stable && type == PositionType.Short)
|
||||||
{
|
{
|
||||||
takeProfitShift = 2.5m;
|
takeProfitShift = 3m;
|
||||||
stopLossShift = 10;
|
//stopLossShift = 10;
|
||||||
}
|
}
|
||||||
if (mode == TradingMode.SlowDropping && type == PositionType.Short)
|
if (mode == TradingMode.SlowDropping && type == PositionType.Short)
|
||||||
{
|
{
|
||||||
|
@ -1225,12 +1225,12 @@ INewPrice message, int windowMaxSize, decimal? uptrendStartingDetectionMeanfullS
|
||||||
if (mode == TradingMode.SlowDropping && type == PositionType.Long)
|
if (mode == TradingMode.SlowDropping && type == PositionType.Long)
|
||||||
{
|
{
|
||||||
takeProfitShift = 1.5m;
|
takeProfitShift = 1.5m;
|
||||||
stopLossShift = 10;
|
//stopLossShift = 10;
|
||||||
}
|
}
|
||||||
if (mode == TradingMode.SlowGrowing && type == PositionType.Short)
|
if (mode == TradingMode.SlowGrowing && type == PositionType.Short)
|
||||||
{
|
{
|
||||||
takeProfitShift = 1.5m;
|
//takeProfitShift = 2.5m;
|
||||||
stopLossShift = 10;
|
//stopLossShift = 10;
|
||||||
}
|
}
|
||||||
if (mode == TradingMode.SlowGrowing && type == PositionType.Long)
|
if (mode == TradingMode.SlowGrowing && type == PositionType.Long)
|
||||||
{
|
{
|
||||||
|
@ -1238,12 +1238,12 @@ INewPrice message, int windowMaxSize, decimal? uptrendStartingDetectionMeanfullS
|
||||||
if (mode == TradingMode.Dropping && type == PositionType.Short)
|
if (mode == TradingMode.Dropping && type == PositionType.Short)
|
||||||
{
|
{
|
||||||
takeProfitShift = 15;
|
takeProfitShift = 15;
|
||||||
stopLossShift = 2;
|
//stopLossShift = 2;
|
||||||
}
|
}
|
||||||
if (mode == TradingMode.Dropping && type == PositionType.Long)
|
if (mode == TradingMode.Dropping && type == PositionType.Long)
|
||||||
{
|
{
|
||||||
stopLossShift = 2;
|
//stopLossShift = 2;
|
||||||
takeProfitShift = 1.5m;
|
takeProfitShift = 3m;
|
||||||
}
|
}
|
||||||
return (stopLossShift, takeProfitShift);
|
return (stopLossShift, takeProfitShift);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue