- UID
- 2
- 积分
- 2892817
- 威望
- 1396440 布
- 龙e币
- 1496377 刀
- 在线时间
- 13326 小时
- 注册时间
- 2009-12-3
- 最后登录
- 2024-12-26
|
【Price Reversal】
- inputs:
- NumDays( 3 ),
-
- MinConsolIndex( 2.25 ),
-
- FinalRangeFactor( 1 ),
- RevCriteria( 1 ),
-
- GapSizeFactor( .2 ),
-
- HiLineColor( Magenta ),
- LoLineColor( LightGray ) ;
- variables:
- var0( 0 ),
- var1( 0 ),
- var2( 0 ),
- var3( 0 ),
- var4( 0 ),
- var5( 0 ) ;
- arrays:
- arr0[ 12, 100 ]( 0 ),
- arr1[3]( 0 ) ;
- Value1 = RS_DailyDataArray( NumDays, arr0, var0, arr1 ) ;
- condition1 = CurrentBar = 1 or Date <> Date[1] ;
- if condition1 then
- begin
- Value2 = RS_TrueExtremes( NumDays, arr0, var0, var1, var2,
- var3 ) ;
- Value3 = RS_PriceExtension( NumDays, MinConsolIndex, FinalRangeFactor,
- var1, var2, var3, arr0, var0 ) ;
- end ;
- Value4 = RS_ReversalPatterns( Value3, RevCriteria, GapSizeFactor, arr0, var0,
- arr1, var4, var5 ) ;
- if Value3 = 1 then
- begin
- Plot1( High, "Ext" ) ;
- if var4 = 1 then
- begin
- Plot2( Close, "Setup" ) ;
- if var5 > 0 then
- Plot3( Low, "Trigger" ) ;
- end ;
- end
- else if Value3 = 2 then
- begin
- Plot1( Low, "Ext" ) ;
- if var4 = 1 then
- begin
- Plot2( Close, "Setup" ) ;
- if var5 > 0 then
- Plot3( High, "Trigger" ) ;
- end ;
- end ;
- condition1 = Mod( CurrentBar, 2 ) = 0 ;
- if condition1 then
- Plot4( var1, "HiLoLines", HiLineColor )
- else
- Plot4( var2, "HiLoLines", LoLineColor )
-
-
-
复制代码 |
论坛官方微信、群(期货热点、量化探讨、开户与绑定实盘)
|