回復 2# BG
感謝BG大的指導,BG大果然是AB神人。修正後的程式碼如下:
-
- _SECTION_BEGIN("chart basic Candle stick ");
- SetChartOptions(0,chartShowArrows|chartShowDates);
- _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
- if (SetBarFillColor( IIf( (C < O) AND (C < Ref( C, -1)), colorGreen, colorRed ) ) );
- else
- (SetBarFillColor( IIf( (C > O)AND (C < Ref( C, -1)), colorWhite,colorWhite)));
- Plot( C, "Close",IIf( C < O, colorGreen, colorRed ), styleCandle );
- _SECTION_END();
複製代碼
上圖中央的chart是紅綠K線。 |