返回列表 发帖

如何设置止赢条件?

比如开仓后价格变动达到50个点即下止赢单,或高位回落多少个点下止赢单,这个函数怎么写?

If(MarketPosition == 1)
        {
                If(High > EntryPrice + 50 * MinMove*PriceScale)
                {
                        myExitPrice = EntryPrice + 50 * MinMove*PriceScale;
                        Sell(lots,myExitPrice);
                }

        }Else If(MarketPosition == -1)
        {
                If( Low < EntryPrice -50* MinMove*PriceScale)
                {
                        myExitPrice = EntryPrice - 50* MinMove*PriceScale;
                        buytocover(lots,myExitPrice);
                }
        }

TOP

也不知我上面写的对不对,还是让NOPAIN看看再说吧.

TOP

If(High > EntryPrice + 50 * MinMove*PriceScale)
If( Low < EntryPrice -50* MinMove*PriceScale)
在这两句里High和Low能不能换成Close

TOP

不能换成了close 就容易造成盘中 和收盘后的指令不一样

TOP

止                             赢
学习TB,哪怕BT。

TOP

5#能告诉我为什么用high和low比么?

TOP

返回列表