I read, studied, looked, some questions arose, which I did not find an answer to (maybe I was not looking for it well), as well as a small wish in terms of ChartRedraw(ExtChartID) in OnDeinit.
double g=0,b=0,dg=1.5,db=0.63; //--- for(uint a,i=0;i<256;i++) { //--- the first 32 flame values are completely transparent a=uchar(i<32?0:i-32); //--- form the colour for the flame value i ExtPal[i]=(a<<24)|(uint(255)<<16)|(uint(g+0.5)<<8)|uint(b+0.5); //--- increment colour components //--- red is graded due to the transparency of the colour if(i>80) g+=dg; if(i>160) b+=db; }
1) For a long time I couldn't understand how the colour was collected (I didn't know what bitwise operations were, nowhere in the help is such a format of colour acquisition described, and the main thing is that the help says:
Тип color предназначен для хранения информации о цвете и занимает в памяти 4 байта. Первый байт не учитывается, остальные 3 байта содержат RGB-составляющие.
Is it right that the first byte is responsible for transparency and it is taken into account ( (a<<24))????
2) Why when switching TF the flame is relit from the middle of the window width (sometimes it happens not from the middle) ?????
3) Why when attaching several indicators on different currency pairs their work interferes with each other (constant flickering) ????? And if on the same currency but different TFs - almost not at all.
4) Where can I see the correlation between the event generation code and the int id of the generated event, why are they different?
EventChartCustom(ExtChartID,1302,0,0,NULL);
void OnChartEvent(const int id,const long &lp,const double &dp,const string &sp) // id=2302
ALXIMIKS:
4) Where can I see the correlation between the event generation code and the int id of the generated event, why are they different?
const int id in OnChartEvent is obtained as the sum of (int) CHARTEVENT_CUSTOM and your custom event identifier in EventChartCustom:
int id = (int) CHARTEVENT_CUSTOM + 1302; // (int) CHARTEVENT_CUSTOM = 1000;Check out the example at the link below.
Color in a general sense does not take transparency bytes into account when used in graphical objects.
But it is available together with special transparency flags when using canvas.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Flame:
The indicator shows the method of drawing gradient semitransparent areas with independent update rate.
Author: Renat Fatkhullin