헌터에도 필터 ㄴ허음

This commit is contained in:
kyh
2024-03-27 19:44:47 +09:00
parent fef8038520
commit d79fac132e
3 changed files with 889 additions and 703 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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;
@@ -729,7 +747,41 @@ namespace Million
continue;
}
}
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";
@@ -767,16 +821,7 @@ 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);

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->