обновление стратегии
test / deploy_trader_prod (push) Successful in 3m14s
Details
test / deploy_trader_prod (push) Successful in 3m14s
Details
parent
7043068105
commit
07e2bcef1c
|
@ -350,7 +350,9 @@ INewPrice message, int windowMaxSize, decimal uptrendStartingDetectionMeanfullSt
|
|||
await LogPrice(message, Constants.BigWindowCrossingAverageProcessor, resultMoveAvFull.bigWindowAv);
|
||||
await LogPrice(message, Constants.SmallWindowCrossingAverageProcessor, resultMoveAvFull.smallWindowAv);
|
||||
}
|
||||
var res = GetInitDict(Constants.PowerLowingCoefficient);
|
||||
var res = GetInitDict(Constants.BlockingCoefficient);
|
||||
res[TradingEvent.DowntrendEnd] = Constants.PowerLowingCoefficient;
|
||||
res[TradingEvent.UptrendEnd] = Constants.PowerLowingCoefficient;
|
||||
if ((resultMoveAvFull.events & TradingEvent.UptrendStart) == TradingEvent.UptrendStart)
|
||||
{
|
||||
res[TradingEvent.UptrendStart] = initValue;
|
||||
|
@ -467,7 +469,7 @@ INewPrice message, int windowMaxSize, decimal uptrendStartingDetectionMeanfullSt
|
|||
return;
|
||||
}
|
||||
//var resTask1 = GetWindowAverageStartData(data, 30, 180, message, windowMaxSize, -2m, 2m,3);
|
||||
var resTask1 = GetWindowAverageStartData(data, 30, 180, message, windowMaxSize, -0.5m, 0.5m, Constants.UppingCoefficient);
|
||||
var resTask1 = GetWindowAverageStartData(data, 30, 180, message, windowMaxSize, -0.5m, 0.5m, Constants.PowerUppingCoefficient);
|
||||
//var resTask3 = GetWindowAverageStartData(data, 30, 180, message, windowMaxSize, 0, 0,0.7m);
|
||||
var getFFTModsTask = GetFFTMods(message);
|
||||
var getAreasModsTask = GetAreasMods(data, message);
|
||||
|
@ -757,17 +759,17 @@ INewPrice message, int windowMaxSize, decimal uptrendStartingDetectionMeanfullSt
|
|||
|
||||
if (position == ValueAmplitudePosition.LowerThenMediana)
|
||||
{
|
||||
res[TradingEvent.UptrendStart] = Constants.UppingCoefficient;
|
||||
res[TradingEvent.DowntrendEnd] = Constants.UppingCoefficient;
|
||||
//res[TradingEvent.UptrendStart] = Constants.UppingCoefficient;
|
||||
//res[TradingEvent.DowntrendEnd] = Constants.UppingCoefficient;
|
||||
res[TradingEvent.UptrendEnd] = Constants.LowingCoefficient;
|
||||
res[TradingEvent.DowntrendStart] = Constants.LowingCoefficient;
|
||||
}
|
||||
if (position == ValueAmplitudePosition.UpperThen30Decil)
|
||||
{
|
||||
res[TradingEvent.UptrendStart] = Constants.PowerLowingCoefficient;
|
||||
res[TradingEvent.UptrendStart] = Constants.BlockingCoefficient;
|
||||
res[TradingEvent.DowntrendEnd] = Constants.LowingCoefficient;
|
||||
res[TradingEvent.UptrendEnd] = Constants.UppingCoefficient;
|
||||
res[TradingEvent.DowntrendStart] = Constants.UppingCoefficient;
|
||||
//res[TradingEvent.UptrendEnd] = Constants.UppingCoefficient;
|
||||
//res[TradingEvent.DowntrendStart] = Constants.UppingCoefficient;
|
||||
}
|
||||
return res.ToImmutableDictionary();
|
||||
}
|
||||
|
@ -778,7 +780,7 @@ INewPrice message, int windowMaxSize, decimal uptrendStartingDetectionMeanfullSt
|
|||
var areas = await GetAreasRelation(data, message);
|
||||
if (areas.HasValue && areas.Value > 0.2m && areas.Value <= 0.8m)
|
||||
{
|
||||
res[TradingEvent.UptrendStart] = Constants.LowingCoefficient;
|
||||
res[TradingEvent.UptrendStart] = Constants.PowerLowingCoefficient;
|
||||
}
|
||||
if (areas.HasValue && areas.Value > 0.8m)
|
||||
{
|
||||
|
@ -825,19 +827,19 @@ INewPrice message, int windowMaxSize, decimal uptrendStartingDetectionMeanfullSt
|
|||
|
||||
if (System.Math.Abs(bys_rel) > 0.6m || System.Math.Abs(sells_rel) > 0.6m)
|
||||
{
|
||||
uptrendStartMode *= Constants.UppingCoefficient * Constants.UppingCoefficient;
|
||||
downstartMode *= Constants.UppingCoefficient * Constants.UppingCoefficient;
|
||||
uptrendStartMode *= Constants.PowerUppingCoefficient;
|
||||
downstartMode *= Constants.PowerUppingCoefficient;
|
||||
}
|
||||
else if (System.Math.Abs(bys_rel) > 0.3m || System.Math.Abs(sells_rel) > 0.3m)
|
||||
{
|
||||
uptrendStartMode *= Constants.UppingCoefficient;
|
||||
downstartMode *= Constants.UppingCoefficient;
|
||||
}
|
||||
else if (System.Math.Abs(bys_rel) <= 0.2m && System.Math.Abs(sells_rel) <= 0.2m)
|
||||
{
|
||||
uptrendEndMode *= Constants.UppingCoefficient;
|
||||
downtrendEndMode *= Constants.UppingCoefficient;
|
||||
}
|
||||
//else if (System.Math.Abs(bys_rel) <= 0.2m && System.Math.Abs(sells_rel) <= 0.2m)
|
||||
//{
|
||||
// uptrendEndMode *= Constants.UppingCoefficient;
|
||||
// downtrendEndMode *= Constants.UppingCoefficient;
|
||||
//}
|
||||
|
||||
res[TradingEvent.UptrendStart] = uptrendStartMode;
|
||||
res[TradingEvent.UptrendEnd] = uptrendEndMode;
|
||||
|
@ -851,6 +853,13 @@ INewPrice message, int windowMaxSize, decimal uptrendStartingDetectionMeanfullSt
|
|||
{
|
||||
var res = GetInitDict(1);
|
||||
var mode = TradingModes[message.Figi];
|
||||
if (mode == TradingMode.None)
|
||||
{
|
||||
res[TradingEvent.UptrendEnd] = Constants.UppingCoefficient;
|
||||
res[TradingEvent.UptrendStart] = 1;
|
||||
res[TradingEvent.DowntrendStart] = Constants.LowingCoefficient;
|
||||
res[TradingEvent.DowntrendEnd] = Constants.UppingCoefficient;
|
||||
}
|
||||
if (mode == TradingMode.Growing)
|
||||
{
|
||||
res[TradingEvent.UptrendEnd] = Constants.PowerLowingCoefficient;
|
||||
|
@ -860,12 +869,14 @@ INewPrice message, int windowMaxSize, decimal uptrendStartingDetectionMeanfullSt
|
|||
}
|
||||
if (mode == TradingMode.Stable)
|
||||
{
|
||||
res[TradingEvent.UptrendEnd] = Constants.PowerLowingCoefficient;
|
||||
res[TradingEvent.UptrendEnd] = 1;
|
||||
res[TradingEvent.UptrendStart] = Constants.UppingCoefficient;
|
||||
res[TradingEvent.DowntrendEnd] = Constants.UppingCoefficient;
|
||||
res[TradingEvent.DowntrendStart] = Constants.BlockingCoefficient;
|
||||
}
|
||||
if (mode == TradingMode.SlowDropping)
|
||||
{
|
||||
res[TradingEvent.UptrendEnd] = Constants.PowerUppingCoefficient;
|
||||
res[TradingEvent.UptrendStart] = Constants.LowingCoefficient;
|
||||
res[TradingEvent.DowntrendStart] = Constants.UppingCoefficient;
|
||||
res[TradingEvent.DowntrendEnd] = Constants.UppingCoefficient;
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace KLHZ.Trader.Service.Controllers
|
|||
//var figi1 = "BBG004730N88";
|
||||
var figi2 = "BBG004730N88";
|
||||
//var figi2 = "FUTIMOEXF000";
|
||||
var time1 = DateTime.UtcNow.AddDays(-shift ?? -7);
|
||||
var time1 = DateTime.UtcNow.AddDays(-shift ?? -7).Date;
|
||||
//var time1 = new DateTime(2025, 9, 4, 14, 0, 0, DateTimeKind.Utc);
|
||||
//var time2 = DateTime.UtcNow.AddMinutes(18);
|
||||
using var context1 = await _dbContextFactory.CreateDbContextAsync();
|
||||
|
|
Loading…
Reference in New Issue