Board logo

标题: 【_StpOrLim Exit】 [打印本页]

作者: 龙听    时间: 2022-11-3 14:16     标题: 【_StpOrLim Exit】

  1. [IntrabarOrderGeneration = false]
  2. inputs:
  3.         SellOrCover( 1 ),                                                  
  4.         StopOrLimit( 1 ),                                                  
  5.         TriggerPrice( 100 ),                              
  6.         ExitQuantity( 1000 ) ;

  7. condition1 = SellOrCover = 1 and StopOrLimit = 1 ;
  8. if condition1 then
  9.         Sell ExitQuantity shares next bar at TriggerPrice stop
  10. else
  11. begin
  12.         condition1 = SellOrCover = 1 and StopOrLimit <> 1 ;
  13.          if condition1 then
  14.                 Sell ExitQuantity shares next bar at TriggerPrice limit
  15.         else
  16.         begin
  17.                 condition1 = SellOrCover <> 1 and StopOrLimit = 1 ;
  18.                 if condition1 then
  19.                         Buy To Cover ExitQuantity shares next bar at TriggerPrice stop
  20.                 else
  21.                 begin
  22.                         condition1 = SellOrCover <> 1 and StopOrLimit <> 1 ;               
  23.                         if condition1 then
  24.                                 Buy To Cover ExitQuantity shares next bar at TriggerPrice limit ;
  25.                 end;
  26.         end;
  27. end;
复制代码





欢迎光临 龙听期货论坛 (http://www.qhlt.cn/) Powered by Discuz! 7.2