|  | 
 
| 各位高手好,小弟剛開始學著寫multicharts程式 有一個問題
 不知道如何寫,拜求高手們指導
 想法如下
 Inputs:FAST(30),SLOW(60);
 vars:OK(0);
 
 if Time=0850 then begin
 OK=OPEND(0);
 FAST=Average(close,FAST);
 SLOW=Average(close,SLOW);
 end;
 
 //===============Long/Short======================
 if OK>FAST and OK>SLOW then goto ==A== ;
 
 if OK<FAST and OK<SLOW then goto ==B== ;
 
 //===============A======================
 if marketposition=0 then
 buy("Entry_B") next bar market;
 
 if marketposition>0 and close crosses under Average(close,FAST) then
 sell("EXIT_B") next bar at market;
 
 goto ==trading End ==
 
 //===============B======================
 if marketposition=0 then
 sellshort("Entry_S") next bar market;
 
 if marketposition<0 and close crosses above Average(close,SLOW) then
 buytocover ("EXIT_S") next bar at market;
 
 goto ==trading End ==
 
 //=================trading End ========================
 if time>=1325 then begin
 sell next bar at market;
 buytocover next bar at market;
 end;
 
 請教紅字的部份應該怎麼寫才對?
 
 圖示可能較清楚
 
   
 先謝謝大家~~
 | 
 |