Is it possible to change the ticker to the full name in the graph
instead of the ticker number in the risk/yield map or is any script around to change this.
And second, how can I limit the tickers or names to a certain watchlist!
Fix Risk/Yield map tool of Window menu has been "replaced" (enhanced/extended/...) by X/Y Scatter chart feature of Exploration output (since Amibroker final version 5.60). It is more flexible as you can plot any scatter (and some other chart styles) there.
Anyway here is sample code by Tomasz with explanation how to use that example ( I have replaced Name() by FullName() function. FullName information has to be existent in Window>Information of each symbol taking part in exploration). You can set list of symbols via "Apply to" setting there in Analysis.
/*
Hello,
Here are the instructions to display X-Y scatter charts in Exploration
1. Click File -> New -> Analysis
2. Pick "Formulas\Exploration\RiskYield.afl" file (shown below)
*/
// This is AFL equivalent of Risk-Yield map
// Note that this exploration should be run on WEEKLY data
// It calculates average weekly gain (yield)
// and standard deviation of gains (risk)
Filter = Status( "lastbarinrange" );
Length = SelectedValue( BarIndex() );
//_TraceF( "%g", length );
Chg = ROC( C, 1 ); //one bar yield
yield = MA( Chg, Length - 1 );
risk = StDev( Chg, Length - 1 );
AddColumn( yield, "yield" );
AddColumn( risk, "risk" );
Clr = ColorHSB( 2 * Status( "stocknum" ) % 255, 255, 255 );
XYChartAddPoint( "Risk/Yield", FullName(), risk[ Length ], yield[ Length ] , Clr );
XYChartSetAxis( "Risk/Yield", "Risk[%]", "Yield[%]" );
/*
3. Click on "EXPLORE" button in the new Analysis window
4. In the bottom row of tabs you will see new "Risk/Yield" tab, click on it and
you will see XY chart generated during exploration:
You can hover the mouse over that X-Y chart to read the values and you can click, drag to mark rectangle
to zoom in. Click without marking rectangle restores full view.
Best regards,
Tomasz Janeczko
amibroker.com
*/
Thanks. It helps me a lot. For a beginner I am trying to change the period to weekly but it is not changing. I tried with TimeFrameSet( inWeekly ) but it didn´t worked. How can I change the period from daily to weekly. Look at the picture if I change it nothing will change. Can you help me, thanks.
You need to change the Periodicity in the Backtester settings. This setting controls bar interval used for backtesting/scan/exploration/optimization. First click the wrench icon: