Chart Background Problem

#1
Hello Members,
Pls. spare some time to help me solve this persistent problem.
I find darker background much more palatable for my charts. I have use the following AFLs which I drag & drop on my charts

1.
_SECTION_BEGIN("Background");
SetChartOptions(0,chartShowArrows|chartShowDates);
if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g
(%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1
)));
}

SetChartBkColor(ParamColor("Outer panel color ",colorBlack)); // color of outer border
SetChartBkGradientFill( ParamColor("Inner panel color upper half",colorDarkTeal),
ParamColor("Inner panel color lower half",colorBlack)//color of inner panel
,ParamColor("behind Text Color", colorRed));
_SECTION_END();

This one plots a "Dark Teal" Background.

2.
_SECTION_BEGIN("Colour Tap");
SetChartOptions(0,chartShowArrows|chartShowDates);
if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g
(%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1
)));
}
SetChartBkColor(ParamColor("Outer panel color ",colorDarkGrey)); // color of outer border
SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )),
ParamColor("BgBottom", ColorRGB( 172,172,172 )),ParamColor("titleblock",ColorRGB( 172,172,172 )));

_SECTION_END();


This one gives a pop up to chose colours for inner panel, outer panel etc.

Now the problem:

The 1st AFL's attributes are retained when I shut down & restart Amibroker, but the 2nd AFL does not retain the colours that I had earlier selected.

I am using 5.20 Final Pro registered version on a Vista 32 OS.

Pls. help me get to the root of the problem.

Similar problem is there with Pattern Explorer templates, which do not retain the changes I make, after a restart.
I have tried making "Linked Charts" also, but the problem keeps cropping up.


Whats the way out?

Regards
 
#2
Hello Members,
Pls. spare some time to help me solve this persistent problem.
I find darker background much more palatable for my charts. I have use the following AFLs which I drag & drop on my charts

1.
_SECTION_BEGIN("Background");
SetChartOptions(0,chartShowArrows|chartShowDates);
if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g
(%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1
)));
}

SetChartBkColor(ParamColor("Outer panel color ",colorBlack)); // color of outer border
SetChartBkGradientFill( ParamColor("Inner panel color upper half",colorDarkTeal),
ParamColor("Inner panel color lower half",colorBlack)//color of inner panel
,ParamColor("behind Text Color", colorRed));
_SECTION_END();

This one plots a "Dark Teal" Background.

2.
_SECTION_BEGIN("Colour Tap");
SetChartOptions(0,chartShowArrows|chartShowDates);
if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g
(%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1
)));
}
SetChartBkColor(ParamColor("Outer panel color ",colorDarkGrey)); // color of outer border
SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )),
ParamColor("BgBottom", ColorRGB( 172,172,172 )),ParamColor("titleblock",ColorRGB( 172,172,172 )));

_SECTION_END();


This one gives a pop up to chose colours for inner panel, outer panel etc.

Now the problem:

The 1st AFL's attributes are retained when I shut down & restart Amibroker, but the 2nd AFL does not retain the colours that I had earlier selected.

I am using 5.20 Final Pro registered version on a Vista 32 OS.

Pls. help me get to the root of the problem.

Similar problem is there with Pattern Explorer templates, which do not retain the changes I make, after a restart.
I have tried making "Linked Charts" also, but the problem keeps cropping up.


Whats the way out?

Regards
I tested it out on my AB (5.20) and whatever color change I do, the same is reatained after restart.

Just check the Preferences to ensure that Autosave is active for Preferences, Templates & Layouts.

If problem still exists, I believe it might be due to some problem during installation process. Just take a backup of whole directory and remove AmiBroker. Re-install again and copy back the folder to its orginal place to see whether it helps.

If it still does not work, well, do contact Support @ amibroker since they shall defnitely have a suitable answer.

Cheers

Prashanth
 
#3
Hi Prashant,
I had this problem before with 5.10.2 but once I shifted to 5.20 RC1 & 5.20 Final, it mysteriously vanished. But today it again came back and all my settings for 2nd AFL disappeared. I checked preferences, they are all checked.
If u use PE, can u tell me if the changes made to PE's templates retain changes made too?
 
#4
hi guys,
can anyone tell me how to change the color background for the charts as white background is not suitable for my eyes and thus i need black one so that i can easily identify the other colours when i have black bacground when i am studying and analysing the charts in nights since white background strains my eyes.

KEVIN SHAH
 
#5
hi guys,
can anyone tell me how to change the color background for the charts as white background is not suitable for my eyes and thus i need black one so that i can easily identify the other colours when i have black bacground when i am studying and analysing the charts in nights since white background strains my eyes.

KEVIN SHAH
you can setting @ menu: Preferences/Color and restart your amibroker.
 
#7
when you move your afl to another computer, it may have derence background color. So, some thing you try to code same backgorund not good. So you need to code dynamic back ground color:

rgb = GetChartBkColor();

Plot(......,rgb,..........);

hope it help.