сменил рабочие интервалы
test / deploy_trader_prod (push) Successful in 14m21s
Details
test / deploy_trader_prod (push) Successful in 14m21s
Details
parent
389a6cbe88
commit
bb7fd20225
|
@ -31,6 +31,10 @@
|
|||
return (crossingTimestamp >= time1 && crossingTimestamp <= time2, crossingTimestamp, cross.y);
|
||||
}
|
||||
}
|
||||
//else if (b1 == b2)
|
||||
//{
|
||||
// return (true, time2, val2_2);
|
||||
//}
|
||||
return (false, DateTime.MinValue, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,9 @@ namespace KLHZ.Trader.Core.Math.Declisions.Utils
|
|||
return (startTime, sum / count);
|
||||
}
|
||||
|
||||
public static (TradingEvent events, decimal bigWindowAv, decimal smallWindowAv) CheckByWindowAverageMean(DateTime[] timestamps, decimal[] prices, int size, int smallWindow, int bigWindow, TimeSpan timeForUptreandStart, decimal downtrendStartingDetectionMeanfullStep = 3m, decimal uptrendEndingDetectionMeanfullStep = 3m)
|
||||
public static (TradingEvent events, decimal bigWindowAv, decimal smallWindowAv) CheckByWindowAverageMean(DateTime[] timestamps,
|
||||
decimal[] prices, int size, int smallWindow, int bigWindow, TimeSpan timeForUptreandStart,
|
||||
decimal downtrendStartingDetectionMeanfullStep = 3m, decimal uptrendEndingDetectionMeanfullStep = 3m)
|
||||
{
|
||||
var res = TradingEvent.None;
|
||||
var bigWindowAv = 0m;
|
||||
|
@ -110,7 +112,7 @@ namespace KLHZ.Trader.Core.Math.Declisions.Utils
|
|||
// если фильтрация окном 120 наползает на окно 15 сверху, потенциальное время открытия лонга и закрытия шорта
|
||||
if (twavss[size - 1] >= twavbs[size - 1] && twavss[size - 2] < twavbs[size - 2])
|
||||
{
|
||||
if (pricesForFinalComparison[crossings[0]] - pricesForFinalComparison[crossings[1]] <= -downtrendStartingDetectionMeanfullStep
|
||||
if (pricesForFinalComparison[crossings[0]] - pricesForFinalComparison[crossings[1]] <= downtrendStartingDetectionMeanfullStep
|
||||
&& times[crossings[0]] - times[crossings[1]] >= timeForUptreandStart)
|
||||
{
|
||||
res |= TradingEvent.UptrendStart;
|
||||
|
|
|
@ -165,11 +165,6 @@ namespace KLHZ.Trader.Core.Exchange.Services
|
|||
{
|
||||
var fullData = await _tradeDataProvider.GetData(message.Figi, TimeSpan.FromMinutes(30));
|
||||
if (fullData.isFullIntervalExists)
|
||||
{
|
||||
var max = fullData.prices.Max();
|
||||
var min = fullData.prices.Min();
|
||||
|
||||
if (max - min < 15 && fullData.prices.Last() - fullData.prices.First() < 4 && fullData.prices.Last() - fullData.prices.First() > -4)
|
||||
{
|
||||
if (!message.IsHistoricalData && BotModeSwitcher.CanPurchase())
|
||||
{
|
||||
|
@ -204,7 +199,6 @@ namespace KLHZ.Trader.Core.Exchange.Services
|
|||
await LogDeclision(DeclisionTradeAction.OpenLong, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((res & TradingEvent.UptrendEnd) == TradingEvent.UptrendEnd)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue