파는 로직에 추가함

This commit is contained in:
kyh
2025-06-19 10:48:45 +09:00
parent d684edc831
commit b2813cc62c
2 changed files with 25 additions and 33 deletions

View File

@@ -409,7 +409,7 @@ namespace BitgetAPI.IndicatorConditionSetup
{ "MarketName", market },
{ "BuyDate", nowTime },
{ "Price", price },
{ "Flag", false },
{ "Flag", 저고점["전저가"] > 저고점["전전저가"] },
{ "MCandleTimeType", (int)interval },
{ "CandleTime", candleData_5.Argument },
{ "Candle", candleData_5 }
@@ -459,18 +459,10 @@ namespace BitgetAPI.IndicatorConditionSetup
var flag = (bool)buyItem["Flag"];
if (interval < MCandleTimeType.H1)
{
var buyTime = ((DateTime)buyItem["BuyDate"]).AddMinutes(1);
var buyTwoTime = buyTime.AddMinutes(5);
var buyTime = ((DateTime)buyItem["BuyDate"]).AddMinutes(5);
if (nowTime < buyTime)
continue;
else if (nowTime < buyTwoTime)
{
if (!(sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongBuy, market, true) &&
!sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongSell, market, true)))
{
buyItem["Flag"] = true;
}
}
}
//임시로 처리
else
@@ -480,13 +472,17 @@ namespace BitgetAPI.IndicatorConditionSetup
continue;
}
var sellFlag = false;
var sellFlag = false;
if (flag)
if (!flag)
{
var buyPrice = (double)buyItem["Price"];
if(candleData_5.Close > buyPrice)
sellFlag= true;
if (저고점["전저가"] > 저고점["전전저가"])
buyItem["Flag"] = true;
}
else
{
if (저고점["전저가"] < 저고점["전전저가"] || 저고점["전저가"] > candleData_5_전봉.Close)
sellFlag = true;
}
if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongSell, market, true) || sellFlag)
@@ -614,7 +610,7 @@ namespace BitgetAPI.IndicatorConditionSetup
{ "MarketName", market },
{ "BuyDate", nowTime },
{ "Price", price },
{ "Flag", false },
{ "Flag", 저고점["전고가"] < 저고점["전전고가"] },
{ "MCandleTimeType", (int)interval },
{ "CandleTime", candleData_5.Argument },
{ "Candle", candleData_5 }
@@ -664,19 +660,11 @@ namespace BitgetAPI.IndicatorConditionSetup
var flag = (bool)buyItem["Flag"];
if (interval < MCandleTimeType.H1)
{
var buyTime = ((DateTime)buyItem["BuyDate"]).AddMinutes(1);
var buyTwoTime = buyTime.AddMinutes(5);
var buyTime = ((DateTime)buyItem["BuyDate"]).AddMinutes(5);
if (nowTime < buyTime)
continue;
else if (nowTime < buyTwoTime)
{
if (!(sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortBuy, market, true) &&
!sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortSell, market, true)))
{
buyItem["Flag"] = true;
}
}
}
//임시로 처리
else
@@ -690,10 +678,14 @@ namespace BitgetAPI.IndicatorConditionSetup
var sellFlag = false;
if (flag)
if (!flag)
{
var buyPrice = (double)buyItem["Price"];
if (candleData_5.Close > buyPrice)
if (저고점["전고가"] < 저고점["전전고가"])
buyItem["Flag"] = true;
}
else
{
if (저고점["전고가"] > 저고점["전전고가"] || 저고점["전고가"] < candleData_5_전봉.Close)
sellFlag = true;
}