[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Code modification Please



PureBytes Links

Trading Reference Links



Hi all,

For the following code I'm using two values to show the number of bars since MACD cross. One value for up and one for down. These values showing both in the chart page, I would like to show only the last values depending to cross if the cross up I need to show the values for up and if it for down cross I need to show the value for down only. Instead of showing both values.

color="#0000ff">Cross(MACD(), Signal());
color="#0000ff">Cross(Signal(), MACD());
BarSinceCrossgreen = BarsSince( One_Houre_Green_Cross);
BarSinceCrossred = BarsSince( One_Houre_Red_Cross);
BarSinceCrossUp = StrFormat(" %g ", BarSinceCrossgreen, SelectedValue( ROC( C, 1 ) ) );
BarSinceCrossDown = StrFormat(" %g ", BarSinceCrossred, SelectedValue( ROC( C, 1 ) ) );

GfxSelectFont( "Arial", 12, 700 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorGreen);
pxHeight = Status( "pxchartheight" );
t = pxHeight;
x5 = 101;

GfxTextOut( BarSinceCrossUp, x5, t -50);
GfxSetTextColor( colorRed);
GfxTextOut( BarSinceCrossDown, x5, t -25);
GfxSelectFont( "Arial", 9, 700 );
GfxSetTextColor( colorBlack);

Bar = "Bar";
x4 = 78;

GfxTextOut( Bar, x4, t -50) ;
GfxTextOut( Bar, x4, t -25) ;

Any one can help please.
Regards



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___