정리
This commit is contained in:
@@ -749,7 +749,7 @@ namespace BitgetAPI.IndicatorConditionSetup
|
||||
|
||||
if (LongCount < 3)
|
||||
{
|
||||
double size = YHKIM_OrderAmount / price;
|
||||
double size = YHKIM_OrderAmount / price * YHKIM_Leverage;
|
||||
var orderData = FutureOrder(market, FutureMarginMode.isolated, size, price, FutureSide.BuyLong, OrderType.limit, YHKIM_Leverage);
|
||||
var orderDic = JsonConvert.DeserializeObject<Dictionary<string, string>>(JsonConvert.SerializeObject(orderData["data"]));
|
||||
|
||||
@@ -1060,7 +1060,7 @@ namespace BitgetAPI.IndicatorConditionSetup
|
||||
|
||||
if(ShortCount < 2)
|
||||
{
|
||||
double size = YHKIM_OrderAmount / price;
|
||||
double size = YHKIM_OrderAmount / price * YHKIM_Leverage;
|
||||
var orderData = FutureOrder(market, FutureMarginMode.isolated, size, price, FutureSide.BuyShort, OrderType.limit, YHKIM_Leverage);
|
||||
var orderDic = JsonConvert.DeserializeObject<Dictionary<string, string>>(JsonConvert.SerializeObject(orderData["data"]));
|
||||
|
||||
@@ -1332,7 +1332,7 @@ namespace BitgetAPI.IndicatorConditionSetup
|
||||
return null;
|
||||
}
|
||||
|
||||
var leverageStr = "{\"symbol\": \"" + symbol + "\", \"productType\": \"usdt-futures\", \"marginCoin\": \"USDT\", \"leverage\": \"" + leverage.ToString() + "\", \"holdSide\": \"" + (futureSide == FutureSide.BuyShort ? "short" : "long") + "\"}";
|
||||
var leverageStr = "{\"symbol\": \"" + symbol + "\", \"productType\": \"USDT-FUTURES\", \"marginCoin\": \"USDT\", \"leverage\": \"" + leverage.ToString() + "\", \"holdSide\": \"" + (futureSide == FutureSide.BuyShort ? "short" : "long") + "\"}";
|
||||
timestamp = (((DateTimeOffset)timeSpan).ToUnixTimeSeconds() * 1000).ToString();
|
||||
var nvcLeverage = new NameValueCollection {
|
||||
{"ACCESS-KEY", YHKIM_AccessKey},
|
||||
|
||||
@@ -11,23 +11,25 @@ using System.Threading.Tasks;
|
||||
namespace BitgetAPI.IndicatorConditionSetup
|
||||
{
|
||||
[Serializable]
|
||||
public class MovingAverageConditionSetup
|
||||
public class MovingAverageConditionSetup
|
||||
{
|
||||
// 지표 기본 값 설정
|
||||
// 이동 평균선 종류
|
||||
public CommonProperty.MovingAverageType MovingAverageType { get; set; }
|
||||
// 기간
|
||||
public int CandleLegnth24 { get; set; } = 24;
|
||||
public int CandleLegnth48 { get; set; } = 48;
|
||||
public int CandleLength24 { get; set; } = 24;
|
||||
public int CandleLength48 { get; set; } = 48;
|
||||
// 기간
|
||||
public int CandleLegnth4 { get; set; } = 4;
|
||||
public int CandleLength4 { get; set; } = 4;
|
||||
// 기간
|
||||
public int CandleLegnth72 { get; set; } = 72;
|
||||
public int CandleLength72 { get; set; } = 72;
|
||||
// 기간
|
||||
public int CandleLegnth12 { get; set; } = 12;
|
||||
public int CandleLength12 { get; set; } = 12;
|
||||
// 기간
|
||||
public int CandleLength8 { get; set; } = 8;
|
||||
|
||||
// 가격
|
||||
public CommonProperty.CandlePriceType MACandlePriceType { get; set; }
|
||||
public CommonProperty.CandlePriceType MACandlePriceType { get; set; }
|
||||
|
||||
// 추후 업데이트 된것을 계산 안하는거 고려 !!!!
|
||||
public void Cal_YHK_Downpublic(List<CandleData> candleDatas, CandleData candleData)
|
||||
@@ -42,11 +44,12 @@ namespace BitgetAPI.IndicatorConditionSetup
|
||||
{
|
||||
candleData.movingAverageDataList = new Dictionary<int, MovingAverageData>();
|
||||
|
||||
candleData.movingAverageDataList.Add(CandleLegnth4, new MovingAverageData());
|
||||
candleData.movingAverageDataList.Add(CandleLegnth12, new MovingAverageData());
|
||||
candleData.movingAverageDataList.Add(CandleLegnth24, new MovingAverageData());
|
||||
candleData.movingAverageDataList.Add(CandleLegnth48, new MovingAverageData());
|
||||
candleData.movingAverageDataList.Add(CandleLegnth72, new MovingAverageData());
|
||||
candleData.movingAverageDataList.Add(CandleLength4, new MovingAverageData());
|
||||
candleData.movingAverageDataList.Add(CandleLength12, new MovingAverageData());
|
||||
candleData.movingAverageDataList.Add(CandleLength24, new MovingAverageData());
|
||||
candleData.movingAverageDataList.Add(CandleLength48, new MovingAverageData());
|
||||
candleData.movingAverageDataList.Add(CandleLength72, new MovingAverageData());
|
||||
candleData.movingAverageDataList.Add(CandleLength8, new MovingAverageData());
|
||||
}
|
||||
|
||||
foreach(var item in candleData.movingAverageDataList.ToList())
|
||||
|
||||
Reference in New Issue
Block a user