想把这个MC的代码改成文华,请老师帮忙 (文华财经WH8赢智V8.2)

投资者咨询:想把这个MC的代码改成文华,请老师帮忙 (文华财经WH8赢智V8.2)
来源:文华财经  日期:2018-6-6 22:50
 Inputs:

   Qty(1),

   Length(18),

   RangeLimit(3.37),

   TrailingStart1(110),

   TrailingStart2(250),

   TrailingStop1(135),

   TrailingStop2(120),

   StopLossSet(185),

   StopLimit(10),

   StopStartBar(48),

   Sslippage(0);//

 

variables:

   MinPoint(0),

   AAPV(0),

   AAPVMA(0),      

   BuyCon(False),

   SellCon(False),

   SellShortCon(False),

   BuyToCoverCon(False),

   MyEntryPrice(0),    

   MyExitPrice(0),       

   HighestAfterEntry(0),       

   LowestAfterEntry(0),

   HL(0),

   VolMA(0),

   VolMA2(0),

   UpCon(False),

   LongStop(0),

   ShortStop(0),

   HighestBarNo(0),

   LowestBarNo(0),

   HighestCloseAfterEntry(0),       

   LowestCloseAfterEntry(0);

  

  

MinPoint=MinMove*PriceScale;

MyEntryPrice=avgentryprice;

VolMA=AverageFC(volume,Length);

VolMA2=AverageFC(VolMA,Length);

UpCon=VolMA[1] > VolMA2[1] And VolMA > VolMA2;

HL=AverageFC((High - Low),Length);

 

AAPV =open[1]*0.1375+open*0.1375+close[1]*0.1125+close*0.1125+high[1]*0.125+high*0.125+low[1]*0.125+low*0.125;

BuyCon =  ( Close[3]>=AAPV[3] and Close[2]>=AAPV[2] and Close[1]>=AAPV[1] and Close>=AAPV)   And UpCon;

SellShortCon =  (Close<=AAPV and Close[3]<=AAPV[3] and Close[2]<=AAPV[2] and Close[1]<=AAPV[1]) And UpCon;         

 

if(BuyCon And Close > Open And Close[1] > Open[1] and marketposition <=0) then  //

     buy next bar at Open;

    

if(SellShortCon And Close < Open And Close[1] < Open[1] and marketposition >=0) then  //

     sellshort next bar at Open;

技术人员回复
日期:2018-6-7 8:23
 
投资者咨询:想把这个MC的代码改成文华,请老师帮忙 (文华财经WH8赢智V8.2)
来源:文华财经  日期:2018-6-6 22:50
 老师您好,右边参数栏只有6个,怎么解决?
技术人员回复
日期:2018-6-7 8:45
将重要的参数写在参数栏中

不重要的参数如2楼源码所示方式,写在模型里面就可以了