開(kāi)拓者 開(kāi)倉(cāng)信號(hào)與程序不符 [開(kāi)拓者 TB]
- 咨詢內(nèi)容: 本帖最后由 yhp2012 于 2012-12-20 13:25 編輯
If(MarketPosition==0&&High>=Highest(High[1],20))
{
FirstPrice=Highest(High[1],20);
If(Open>FirstPrice) FirstPrice=Open;
LastPrice=FirstPrice;
lots=1/6*Portfolio_CurrentCapital/(FirstPrice*300*MarginRatio);
lots=IntPart(lots);
Buy(lots,FirstPrice);
}
If(MarketPosition==0&&Low<=Lowest(Low[1],20))
{
FirstPrice=Lowest(Low[1],20);
If(Open<FirstPrice) FirstPrice=Open;
LastPrice=FirstPrice;
lots=1/6*Portfolio_CurrentCapital/(FirstPrice*300*MarginRatio);
lots=IntPart(lots);
SellShort(lots,FirstPrice);
}
- TB技術(shù)人員: 怎么插入圖片呢,超級(jí)圖表上開(kāi)倉(cāng)都是亂來(lái)了,頭痛
- TB客服: 怎么插入圖片呢,超級(jí)圖表上開(kāi)倉(cāng)都是亂來(lái)了,頭痛
- 網(wǎng)友回復(fù): 為什么出現(xiàn)這種情況啊,上面的圖是超神圖表開(kāi)始部分的BAR,這我表示壓力很大
- 網(wǎng)友回復(fù):
hghest,lowest這兩個(gè)函數(shù)的賦值不要放入條件內(nèi)。可以先定義兩個(gè)變量aa,bb,- aa = Highest(High[1],20);
- bb = Lowest(Low[1],20);
- If(MarketPosition==0&&High>=aa)
- {
- FirstPrice=Highest(High[1],20);
- If(Open>FirstPrice) FirstPrice=Open;
- LastPrice=FirstPrice;
- lots=1/6*Portfolio_CurrentCapital/(FirstPrice*300*MarginRatio);
- lots=IntPart(lots);
- Buy(lots,FirstPrice);
- }
- If(MarketPosition==0&&Low<= bb)
- {
- FirstPrice=Lowest(Low[1],20);
- If(Open<FirstPrice) FirstPrice=Open;
- LastPrice=FirstPrice;
- lots=1/6*Portfolio_CurrentCapital/(FirstPrice*300*MarginRatio);
- lots=IntPart(lots);
- SellShort(lots,FirstPrice);
- }
復(fù)制代碼
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 262069696 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容