開拓者 開倉信號與程序不符 [開拓者 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ù)人員: 怎么插入圖片呢,超級圖表上開倉都是亂來了,頭痛
- TB客服: 怎么插入圖片呢,超級圖表上開倉都是亂來了,頭痛
- 網(wǎng)友回復(fù): 為什么出現(xiàn)這種情況啊,上面的圖是超神圖表開始部分的BAR,這我表示壓力很大
- 網(wǎng)友回復(fù):
hghest,lowest這兩個函數(shù)的賦值不要放入條件內(nèi)。可以先定義兩個變量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ù)制代碼
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 262069696 進(jìn)行 有償 編寫!(不貴!點擊查看價格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容