очистка кода
test / deploy_trader_prod (push) Successful in 1m55s Details

main
vlad zverzhkhovskiy 2025-09-03 07:05:06 +03:00
parent 6884407f12
commit d045f9b082
3 changed files with 6 additions and 6 deletions

View File

@ -25,7 +25,7 @@
if (k1 != k2)
{
var cross = LinesCrossing(k1, b1, k2, b2);
if (cross.x>=0 && cross.x <= dtime)
if (cross.x >= 0 && cross.x <= dtime)
{
var crossingTimestamp = time1.AddSeconds((double)cross.x);
return crossingTimestamp >= time1 && crossingTimestamp <= time2;

View File

@ -18,7 +18,7 @@ namespace KLHZ.Trader.Core.Math.Declisions.Utils
return (startTime, sum / count);
}
public static TradingEvent CheckByWindowAverageMean(DateTime[] timestamps, decimal[] prices, int size,int smallWindow, int bigWindow, decimal meanfullStep = 3m)
public static TradingEvent CheckByWindowAverageMean(DateTime[] timestamps, decimal[] prices, int size, int smallWindow, int bigWindow, decimal meanfullStep = 3m)
{
var res = TradingEvent.None;
if (timestamps.Length < size)
@ -29,8 +29,8 @@ namespace KLHZ.Trader.Core.Math.Declisions.Utils
var twavss = new decimal[size];
var twavbs = new decimal[size];
var times = new DateTime[size];
for (int shift = 0; shift < size; shift++)
{
var twavs = CalcTimeWindowAverageValue(timestamps, prices, smallWindow, shift);

View File

@ -141,10 +141,10 @@ namespace KLHZ.Trader.Core.Exchange.Services
}
var result = MovingAverage.CheckByWindowAverageMean(data.timestamps, data.prices, 100,15,120);
var result = MovingAverage.CheckByWindowAverageMean(data.timestamps, data.prices, 100, 15, 120);
if ((result & TradingEvent.StopBuy) == TradingEvent.StopBuy)
{
var stopTo = (message.IsHistoricalData?message.Time: DateTime.UtcNow).AddMinutes(_buyStopLength);
var stopTo = (message.IsHistoricalData ? message.Time : DateTime.UtcNow).AddMinutes(_buyStopLength);
BuyStops.AddOrUpdate(message.Figi, stopTo, (k, v) => stopTo);
declisionsForSave.Add(new Declision()
{