Trash Sir
Didnt get, what you explained to do.
Please do not get angry. We are not as expert as you, May be one day.
If you have explained it previously in any other thread, then please post link. Otherwise, please explain in some detail.
Thanks
Didnt get, what you explained to do.
Please do not get angry. We are not as expert as you, May be one day.
If you have explained it previously in any other thread, then please post link. Otherwise, please explain in some detail.
Thanks
You should not use Foreign if there are multiple foreign arrays to be calculated and output. It's clearly mentioned that SetForeign() is multiple times faster than calling multiple time Foreign(). You just have to read it in the AmiBroker help.
Anyway this is a simplified version of the picture in posting #3 without foreign title
Code:
_SECTION_BEGIN( "Default Symbol" );
// by trash
// http://www.traderji.com/amibroker/86476-scalability-issues-2.html#post978411
GraphXSpace = Param( "Stretch/Compress", 5, -50, 100, 1 );// or use Shift + left mouse on the y-axis
Color1 = ParamColor( "Default Symbol - Color", colorGrey50 );
style1 = ParamStyle( "Default Symbol - Style", styleBar| styleNoTitle, maskAll );
SetChartOptions( 0, chartShowArrows | chartShowDates | chartWrapTitle );
_N( Title = StrFormat( EncodeColor( Color1 ) + "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}} ", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );
Plot( C, "", Color1, style1 );
Plot( MA( C, 50 ), "MA", Color1, styleLine );
Plot( BBandTop( C, 20, 2 ), "BBTop", Color1, styleLine );
Plot( BBandBot( C, 20, 2 ), "BBBot", Color1, styleLine );
_SECTION_END();
_SECTION_BEGIN( "Foreign Symbol" );
// by trash
// http://www.traderji.com/amibroker/86476-scalability-issues-2.html#post978411
EnableTextOutput( False );
ticker2 = ParamStr( "Foreign Symbol1", "INPUT HERE" );
color2 = ParamColor( "Foreign Symbol1 - Color", colorOrange );
style2 = ParamStyle( "Foreign Symbol1 - Style", styleBar | styleLeftAxisScale, maskAll );
styleindi = styleLine | styleLeftAxisScale;
if ( ticker2 == "INPUT HERE" || ticker2 == "" )
style2 = styleindi = styleNoDraw | styleNoTitle;
SetForeign( ticker2 );
Plot( C, "\n" + ticker2, Color2, style2 );
// add other calculations/plots here
Plot( MA( C, 50 ), "\nMA foreign", color2, styleindi );
Plot( BBandTop( C, 20, 2 ), "\nBBTop foreign", Color2, styleindi );
Plot( BBandBot( C, 20, 2 ), "\nBBBot foreign", Color2, styleindi );
RestorePriceArrays();
EnableTextOutput( True );
_SECTION_END();
Last edited: