- UID
- 2
- 积分
- 2874674
- 威望
- 1387366 布
- 龙e币
- 1487308 刀
- 在线时间
- 13156 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-11-24
|
【Formula OHLC】
- inputs:
- Formula( RSI( C, 14 ) ),
- Baseline1( 70 ),
- Baseline2( 30 ),
- PlotBaseline1( true ),
- PlotBaseline2( true ) ;
- variables:
- intrabarpersist var0( 0 ),
- intrabarpersist var1( 0 ),
- intrabarpersist var2( 0 ),
- intrabarpersist var3( 0 ),
- intrabarpersist var4( 0 ) ;
- condition1 = GetAppInfo( aiRealTimeCalc ) = 1 ;
- if condition1 then
- begin
-
- if var0 <> CurrentBar then
- begin
- var1 = Formula ;
- var2 = Formula ;
- var3 = Formula ;
- var4 = Formula ;
- var0 = CurrentBar ;
- end ;
- if Formula > var2 then
- var2 = Formula ;
- if Formula < var3 then
- var3 = Formula ;
- Plot1( var1, "FormulaOpen" ) ;
- Plot2( var2, "FormulaHigh" ) ;
- Plot3( var3, "FormulaLow" ) ;
- Plot4( Formula, "FormulaClose" ) ;
-
- end ;
- if PlotBaseline1 then
- Plot5( Baseline1, "Baseline1" ) ;
- if PlotBaseline2 then
- Plot6( Baseline2, "Baseline2" ) ;
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|