此範例可在 AmiBroker 畫面中標示出最高價、最低價,參考看看囉 ~
↓ 圖例
↓ 程式碼
// // 取畫面中最高價 // _HHVShapes = ( HighestVisibleValue( H ) == H ); // // 取畫面中最低價 // _LLVShapes = ( LowestVisibleValue( L ) == L ); // // 標示最高價、最低價之K線 // PlotShapes( _HHVShapes * shapeSmallSquare + _LLVShapes * shapeSmallSquare , colorWhite , 0 , _HHVShapes * High + _LLVShapes * Low , _HHVShapes * 10 + _LLVShapes * -10 ); // // 於K線上標示最高價、最低價 // for ( i = 0; i < BarCount; i++ ) { if ( _HHVShapes[ i ] ) PlotText( "最高點:" + H[ i ] , i + 2 , H[ i ] , colorWhite ); if ( _LLVShapes[ i ] ) PlotText( "最低點:" + L[ i ] , i + 2 , L[ i ] , colorWhite ); } Plot( C, "", colorWhite, styleCandle );
全站熱搜
留言列表