请教前辈: 下列飞狐公式代码如何在AB中实现? 多谢! RSI1:"RSI#MIN5",LINETHICK0; {5分钟K线的RSI} RSI2:"RSI#MIN15",LINETHICK0; {15分钟K线的RSI} DRAWICON(RSI2<30 AND CROSS(RSI1,RSI2),RSI2*0.995,4); {上穿标指示箭头} DRAWICON(RSI2>70 AND CROSS(RSI2,RSI1),RSI2*1.005,5); {下穿标指示箭头} n1;n2
pd=Param("RSI Period",9,1,30); TimeFrameSet( in5Minute); RSIshort =RSI(pd); TimeFrameRestore(); TimeFrameSet( in15Minute); RSIlong = RSI(pd); TimeFrameRestore(); // plot expanded RSI RSI1=TimeFrameExpand( RSIshort, in5Minute); RSI2=TimeFrameExpand( RSIlong, in15Minute); Plot( RSI1, "5 min rsi", colorBlue,5 ); Plot( RSI2, "15 min rsi", colorRed,5 ); B=Cross(RSI1,RSI2) AND RSI2<30; S=Cross(RSI2,RSI1) AND RSI2>70; //plot the arrow indications PlotShapes(shapeSmallUpTriangle*B,colorYellow,0,RSI2,0); PlotShapes(shapeSmallDownTriangle*S,colorYellow,0,RSI2,0); Plot(30,"",1,32); Plot(70,"",7,1); Plot(50,"",2,32);
"道琼斯指数期货" - IB的 YM JUN 08-ECBOT-FUT 有IB的接口直接看就好了 公式引用第三方数据: close=Foreign( "YM JUN 08-ECBOT-FUT", "Close" ) ;