Custom colorcycle

Is there a way to cycle through a custom list of colour for plots?

I'd like to rotate through green, red, blue (and others) - but can only find the amibroker defined ones as below:

stcol = ParamColor( "Color", colorCycle );

symlist = "AAPL,BIDU,MSFT,TSLA,META";

for( i = 0; ( symbol = StrExtract( symlist, i ) ) != ""; i++ )
{
	Plot(Foreign(symbol,"C"),symbol,stcol);
}

@traderuk99 - you can define your own if you like

https://www.amibroker.com/guide/afl/colorhsb.html
https://www.amibroker.com/guide/afl/colorrgb.html
https://www.amibroker.com/guide/afl/colorblend.html

@traderuk99, please, check this KB article that shows a simple way to do it without the need to create a custom color list.

As an alternative you can store your custom colors (that are numbers) in a single row (or col) matrix and use them in you loop, retrieving the needed color using the appropriate index.

1 Like

Thanks, yes had forgotten about matrices :slight_smile:

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.