초기화 로직 추가
This commit is contained in:
@@ -121,8 +121,8 @@ namespace BitgetAPI.IndicatorConditionSetup
|
||||
public Dictionary<string, double> BuyShortStepStampData = new Dictionary<string, double>();
|
||||
public Dictionary<string, double> BuyLongStepStampData = new Dictionary<string, double>();
|
||||
|
||||
|
||||
public int 전가Flag = 1;
|
||||
public Dictionary<string, bool> FirstFlag = new Dictionary<string, bool>();
|
||||
|
||||
|
||||
|
||||
// 전봉이 구름떼 돌파후 시가가 구름떼 위에서 시작하는 것
|
||||
@@ -239,6 +239,8 @@ namespace BitgetAPI.IndicatorConditionSetup
|
||||
|
||||
if (!전저고점.ContainsKey(market + strInterval))
|
||||
{
|
||||
FirstFlag.Add(market + strInterval + "Long", false);
|
||||
FirstFlag.Add(market + strInterval + "Short", false);
|
||||
var dic = new Dictionary<string, double>
|
||||
{
|
||||
{ "전고가", 0 },
|
||||
@@ -371,8 +373,17 @@ namespace BitgetAPI.IndicatorConditionSetup
|
||||
//사는 시점
|
||||
if (!UpBuyList.ContainsKey(market))
|
||||
{
|
||||
if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongBuy) &&
|
||||
!sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongSell))
|
||||
if(!FirstFlag[market + strInterval + "Long"])
|
||||
{
|
||||
if(sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongSell, true))
|
||||
{
|
||||
FirstFlag[market + strInterval + "Long"] = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongBuy, true) &&
|
||||
!sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.LongSell, true) &&
|
||||
FirstFlag[market + strInterval + "Long"])
|
||||
{
|
||||
BuyLongStep[market] = 0;
|
||||
// 없으면 생성
|
||||
@@ -565,8 +576,18 @@ namespace BitgetAPI.IndicatorConditionSetup
|
||||
//사는 시점
|
||||
if (!DownBuyList.ContainsKey(market))
|
||||
{
|
||||
if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortBuy) &&
|
||||
!sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortSell))
|
||||
if (!FirstFlag[market + strInterval + "Short"])
|
||||
{
|
||||
if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortSell, true))
|
||||
{
|
||||
FirstFlag[market + strInterval + "Short"] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortBuy, true) &&
|
||||
!sMABandConditionSetup.Calculate(candleDatas_5_TempList, SMABandType.ShortSell, true) &&
|
||||
FirstFlag[market + strInterval + "Short"])
|
||||
{
|
||||
BuyShortStep[market] = 0;
|
||||
// 없으면 생성
|
||||
|
||||
Reference in New Issue
Block a user