싹다 수정
This commit is contained in:
@@ -45,6 +45,7 @@ namespace BitgetAPI
|
||||
// 스레드 종료 플래그
|
||||
bool Is_th_th_MarketInfoList_WebService = false;
|
||||
bool Is_th_treeListUpdate = false;
|
||||
bool Is_th_dataCalculateThread = false;
|
||||
|
||||
// 신호검색 리스트 작성
|
||||
// 신호 Long 상승 (구매)
|
||||
@@ -173,7 +174,7 @@ namespace BitgetAPI
|
||||
private void DataCalculateThread(BitgetWebSocketType type)
|
||||
{
|
||||
var flag = true;
|
||||
|
||||
Is_th_dataCalculateThread = true;
|
||||
//속도 개선을 위하여 미리 선언
|
||||
while (webConnection.Is_th_webSocketThread)
|
||||
{
|
||||
@@ -183,7 +184,8 @@ namespace BitgetAPI
|
||||
th_SignalInfo = new Thread(new ThreadStart(Signalnfo));
|
||||
th_SignalInfo.Start();
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
if(!Is_th_dataCalculateThread) break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +298,7 @@ namespace BitgetAPI
|
||||
}));
|
||||
|
||||
}
|
||||
dataCalculateThread = new Thread(() => DataCalculateThread(BitgetWebSocketType.현황정보_전체종목));
|
||||
dataCalculateThread = new Thread(() => DataCalculateThread(BitgetWebSocketType.캔들정보));
|
||||
dataCalculateThread.Start();
|
||||
}
|
||||
|
||||
@@ -435,7 +437,15 @@ namespace BitgetAPI
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(dataCalculateThread != null)
|
||||
{
|
||||
Is_th_dataCalculateThread = false;
|
||||
if (dataCalculateThread.ThreadState == ThreadState.Running)
|
||||
{
|
||||
dataCalculateThread.Join();
|
||||
dataCalculateThread = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 검색기 > 종목 재 정렬
|
||||
@@ -475,9 +485,20 @@ namespace BitgetAPI
|
||||
th_treeListMarketInfoListUpdateTimer.Join();
|
||||
th_treeListMarketInfoListUpdateTimer = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (dataCalculateThread != null)
|
||||
{
|
||||
Is_th_dataCalculateThread = false;
|
||||
|
||||
if (dataCalculateThread.ThreadState == ThreadState.Running)
|
||||
{
|
||||
dataCalculateThread.Join();
|
||||
dataCalculateThread = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach (var candleList in commonProperty.candleDataLists)
|
||||
{
|
||||
foreach (var interval in candleList.candleDataList)
|
||||
@@ -511,7 +532,8 @@ namespace BitgetAPI
|
||||
{
|
||||
var args = new Dictionary<string, object>();
|
||||
args.Add("instType", "USDT-FUTURES");
|
||||
args.Add("channel", "ticker");
|
||||
//args.Add("channel", "ticker");
|
||||
args.Add("channel", "candle1m");
|
||||
args.Add("instId", marketName);
|
||||
argsList.Add(args);
|
||||
|
||||
@@ -530,8 +552,8 @@ namespace BitgetAPI
|
||||
|
||||
commonProperty.webConnection = webConnection;
|
||||
webConnection.Is_th_webSocketThread = true;
|
||||
webConnection.BitGetWebSocektStart(BitgetWebSocketType.현황정보_전체종목, dic);
|
||||
|
||||
//webConnection.BitGetWebSocektStart(BitgetWebSocketType.현황정보_전체종목, dic);
|
||||
webConnection.BitGetWebSocektStart(BitgetWebSocketType.캔들정보, dic);
|
||||
//th_webSocketThread = new Thread(() => TheadWebSocketRecieve(BitgetWebSocketType.현황정보_전체종목, dic));
|
||||
//th_webSocketThread.Start();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user