헌터에도 필터 ㄴ허음
This commit is contained in:
1425
Million Hunter/HunterMainForm.Designer.cs
generated
1425
Million Hunter/HunterMainForm.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,11 @@ namespace Million
|
||||
|
||||
public Dictionary<string, bool> FirstTimeBuyFlag = null;
|
||||
|
||||
|
||||
private Dictionary<string, bool> slopeDic = new Dictionary<string, bool>();
|
||||
private bool slopeFlag = false;
|
||||
private string indicatorNum = "";
|
||||
private string slopeBuy = "";
|
||||
private string slopeSell = "";
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -85,6 +89,15 @@ namespace Million
|
||||
simpleButton_SetupDelete.Visible = false;
|
||||
simpleButton_TobuyList.Visible = true;
|
||||
simpleButton_ToSellList.Visible = true;
|
||||
var strList = new string[2];
|
||||
|
||||
strList[0] = "-";
|
||||
strList[1] = "+";
|
||||
|
||||
cb_buy.Properties.Items.Clear();
|
||||
cb_buy.Properties.Items.AddRange(strList);
|
||||
cb_sell.Properties.Items.Clear();
|
||||
cb_sell.Properties.Items.AddRange(strList);
|
||||
}
|
||||
|
||||
// 지표 콤보박스 클릭 시 이벤트
|
||||
@@ -343,6 +356,11 @@ namespace Million
|
||||
totalIndicator.AddRange(buyIndicatorList);
|
||||
totalIndicator.AddRange(sellIndicatorList);
|
||||
|
||||
slopeFlag = ck_SlopeSell.Checked;
|
||||
indicatorNum = tb_IndicatorNum.Text;
|
||||
slopeBuy = cb_buy.Text.ToString();
|
||||
slopeSell = cb_sell.Text.ToString();
|
||||
|
||||
var tableList = CommonProperty.selectedMarketOfPlaceList;
|
||||
var totalResultList = new List<SearchResult>();
|
||||
var startDate = savedResult.StartDateTime;
|
||||
@@ -730,6 +748,40 @@ namespace Million
|
||||
}
|
||||
}
|
||||
|
||||
if (slopeFlag)
|
||||
{
|
||||
var indi = totalIndicator.FirstOrDefault(t => t.IndexString == indicatorNum);
|
||||
slopeDic[item] = false;
|
||||
if (indi != null)
|
||||
{
|
||||
var timeType = indi.MCandleTimeType;
|
||||
|
||||
var key = CalculateManager.GetKeyData(indi);
|
||||
|
||||
var itemDataList = standardData[timeType];
|
||||
|
||||
if (itemDataList.Count > 2)
|
||||
{
|
||||
var before = itemDataList[itemDataList.Count - 2];
|
||||
var beforeVal = before.IndicatorDic[key].value;
|
||||
var recently = itemDataList[itemDataList.Count - 1];
|
||||
var recentlyVal = recently.IndicatorDic[key].value;
|
||||
if (slopeBuy == "+")
|
||||
{
|
||||
if (beforeVal < recentlyVal)
|
||||
slopeDic[item] = true;
|
||||
}
|
||||
else if (slopeBuy == "-")
|
||||
{
|
||||
if (beforeVal > recentlyVal)
|
||||
slopeDic[item] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
var buyData = new CandleDataList();
|
||||
@@ -752,6 +804,8 @@ namespace Million
|
||||
//Hunter의 경우 1분안에 사고 팔고가 다 끝날수도 있음 그러므로 처리해야함
|
||||
if (buyList.Any(t => t.ConGoodsData.CoinFullName == item))
|
||||
{
|
||||
var buyItem = buyList.FirstOrDefault(x => x.ConGoodsData.CoinFullName == item);
|
||||
var buyCandleData = buyItem.CandleDataLists_Im[0];
|
||||
var flag = false;
|
||||
var scriptStr = sellScript.regularExpressionString;
|
||||
var str = "default";
|
||||
@@ -768,15 +822,6 @@ namespace Million
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
//default sell
|
||||
flag = sellScript.DicExcuteScript(recentlyData.CalculateFlag);
|
||||
scriptStr = sellScript.regularExpressionString;
|
||||
}
|
||||
|
||||
if (flag)
|
||||
{
|
||||
var buyItem = buyList.FirstOrDefault(x => x.ConGoodsData.CoinFullName == item);
|
||||
var buyCandleData = buyItem.CandleDataLists_Im[0];
|
||||
if (str != "exception")
|
||||
{
|
||||
if ((int)smallCandleType < 60)
|
||||
@@ -807,6 +852,54 @@ namespace Million
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//default sell
|
||||
flag = sellScript.DicExcuteScript(recentlyData.CalculateFlag);
|
||||
scriptStr = sellScript.regularExpressionString;
|
||||
}
|
||||
|
||||
if (slopeFlag)
|
||||
{
|
||||
var indi = totalIndicator.FirstOrDefault(t => t.IndexString == indicatorNum);
|
||||
slopeDic[item] = false;
|
||||
if (indi != null)
|
||||
{
|
||||
var timeType = indi.MCandleTimeType;
|
||||
|
||||
var key = CalculateManager.GetKeyData(indi);
|
||||
|
||||
var itemDataList = standardData[timeType];
|
||||
|
||||
if (itemDataList.Count > 2)
|
||||
{
|
||||
var before = itemDataList[itemDataList.Count - 2];
|
||||
var beforeVal = before.IndicatorDic[key].value;
|
||||
var recently = itemDataList[itemDataList.Count - 1];
|
||||
var recentlyVal = recently.IndicatorDic[key].value;
|
||||
if (slopeSell == "+")
|
||||
{
|
||||
if (beforeVal < recentlyVal)
|
||||
{
|
||||
slopeDic[item] = false;
|
||||
flag = true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (slopeSell == "-")
|
||||
{
|
||||
if (beforeVal > recentlyVal)
|
||||
{
|
||||
slopeDic[item] = false;
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (flag)
|
||||
{
|
||||
var sellItem = recentlyData;
|
||||
var valDic = ResultLogicManager.GetIndicateValue(sellItem.CalculateFlag, totalIndicator, sellItem);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user