Слияние кода завершено, страница обновится автоматически
dbName="dfs://level_2"
snapshotTBname="snapshot"
idate=2022.04.14
snapshotTB=select* from loadTable(dbName,snapshotTBname) where date(DateTime)=idate and SecurityID in [`600000.SH,`000001.SZ]
timer {
res=select SecurityID, DateTime,timeWeightedOrderSlope(BidPrice[0],BidOrderQty[0],OfferPrice[0],OfferOrderQty[0],
20) as TimeWeightedOrderSlopeFactor from snapshotTB context by SecurityID csort DateTime
}
timer {
res=select SecurityID, DateTime,level10_InferPriceTrend(BidPrice,OfferPrice,BidOrderQty,OfferOrderQty,60,20) as Level10_InferPriceTrend
from snapshotTB context by SecurityID csort DateTime
}
timer {
res=select SecurityID, DateTime, level10_Diff(BidPrice, BidOrderQty, true,20) as Level10_Diff from snapshotTB context by SecurityID csort DateTime
}
timer {
res=select SecurityID, DateTime,traPriceWeightedNetBuyQuoteVolumeRatio(BidPrice[0],BidOrderQty[0],OfferPrice[0],OfferOrderQty[0],TotalValueTrade,
TotalVolumeTrade) as TraPriceWeightedNetBuyQuoteVolumeRatio from snapshotTB context by SecurityID csort DateTime
}
timer {
res=select SecurityID, DateTime,wavgSOIR( BidOrderQty,OfferOrderQty,20) as HeightImbalance from snapshotTB context by SecurityID csort DateTime
}
entrustTB=select SecurityID,DateTime,Price,OrderQty,ApplSeqNum,OrderType,side from loadTable( "dfs://level_2","entrust") where DateTime.date()=2022.04.14 and SecurityID in ["000001.SZ","000040.SZ"]
tradeTB =select * from loadTable("dfs://level_2","trade") where DateTime.date()=2022.04.14 and SecurityID in ["000001.SZ","000040.SZ"]
timer {
t=calcSZOrderValue(entrustTB,tradeTB)
}
timer{
t1=select * from tradeTB where ExecType == 52
t2=select * from entrustTB where Price>0
t=calcSZwithdrawOrderValue(t1,t2)
}
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )