以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://222.73.7.161/bbs/index.asp)
--  公式模型编写问题提交  (http://222.73.7.161/bbs/list.asp?boardid=4)
----  代码转化问题  (http://222.73.7.161/bbs/dispbbs.asp?boardid=4&id=164228)

--  作者:hpl1990
--  发布时间:2018/7/1 20:21:04
--  代码转化问题

inputs:

  Rlth(18),

  Rpnt(9.8),    

  Lots(1);

                    

variables:

  mhihest(0),

  mlesiow(0),

  Nechane(0),

  outprice(0);

  

mhihest=Highest(high,Rlth);

mlesiow  = Lowest(Low,Rlth);

Nechane = (mhihest - mlesiow)/((mhihest + mlesiow)*0.5)*100; 

 

If (MarketPosition<>1 And Nechane<=Rpnt) then

     buy Lots shares next bar at mhihest stop;

If (MarketPosition<>-1 And Nechane<=Rpnt) then

     sellshort Lots shares next bar at mlesiow stop;


--  作者:fly
--  发布时间:2018/7/4 9:37:43
--  
请详细说明下面两句实现的目标。

If (MarketPosition<>1 And Nechane<=Rpnt) then

     buy Lots shares next bar at mhihest stop;

If (MarketPosition<>-1 And Nechane<=Rpnt) then

     sellshort Lots shares next bar at mlesiow stop;


--  作者:FireScript
--  发布时间:2018/7/4 9:40:17
--  
 你这个是代码是TB的源码吗?还是别的其他软件的代码。
[此贴子已经被作者于2018/7/4 9:42:54编辑过]