取得畫面中最高價X軸的BARCOUNT
請問大大如何取得畫面中最高價X軸的BARCOUNT,Thanks. Highest price of whole barcount?hprice = Highest( H ); Thanks,但我所要的是畫面中最高價的barindex. HighestSinceBars - bars since highest value since condition met
不知這個是不是你要的?
畫面中的最高價的barindex,可以
一、先求出畫面中最前與最後的barindex
二、再用一個for迴圈求出其中的最高價,取得其barindex
一、用status( ''statuscode'' ),其中的
"firstvisiblebar", "lastvisiblebar", "firstvisiblebarindex", "lastvisiblebarindex"
二、for迴圈,應該不用我多嘴了
畫面參考:4.畫面中最高、低點價位及漲跌幅。 thanks everyone,我已有抓到,但 顯則到最高價左邊則barindex為empty
,我在試試.,謝謝 linmike 發表於 14-10-31 08:07 static/image/common/back.gif
Thanks,但我所要的是畫面中最高價的barindex.
So like this one?
hprice = Highest( H );
hbi = ValueWhen( H == hprice, BarIndex() );
Plot( hbi, "Barindex of Highest value", colorRed, styleHistogram );
本帖最後由 joshsmi 於 14-11-1 19:57 編輯
Sort function of AmiBroker 5.88Version( 5.88 );
SetBarsRequired( sbrall );
Plot( Sort( H, 0, -1, True ), "Barindex of Sorted Highest value", colorRed, styleHistogram ); barssinceH = HighestSinceBars( H == Highest( H ), H );
Plot( barssinceH, "Bars Since Highest value", colorRed, styleHistogram ); joshsmi 發表於 14-11-1 20:00 static/image/common/back.gif
Actually
barssinceH = BarsSince( H == Highest( H ) );
Plot( barssinceH, "Bars Since Highest value", colorRed, styleHistogram );
thanks everyone,i have got it that i wanted.
頁:
[1]