Questions from Beginners MQL4 MT4 MetaTrader 4 - page 193

 
Igor Makanu:

I would try to take a resource from CBmpButton and apply transparency to the resource, it should probably work

Maybe, but I don't think it's worth it to do this kind of manipulation for the sake of 2 buttons.

 
If you're ever in Tushino, stop by.
 
Алексей Тарабанов:
When you're in Tushino, stop by.

I don't drink, thank you!

 

Guys, there's a hitch - I can't figure it out

There is a code, how to output 5 objects with step+coefficient?

   for(int i=0; i<5; i++) {
    double Step=100*Point;
    double Multiple=2.0;
     SetArrowPrice(0,"Pos"+(string)i,TimeCurrent(),Ask+(Step*i*Multiple),clrDodgerBlue);
   }

This code draws everything in 200, while I need the first one in Ask, the second in 100, the third in 200 from the second, etc.

 
Vitaly Muzichenko:

Guys, there's a hitch - I can't figure it out

There is a code, how to output 5 objects with step+coefficient?

This code draws everything in 200, while I need the first one in Ask, the second in 100, the third in 200 from the second, etc.

double step=100*Point,_step=0.0;
double mult=2.0;
for(int i=0; i<5; i++) {
    SetArrowPrice(0,"Pos"+(string)i,TimeCurrent(),Ask+_step,clrDodgerBlue);
    _step+=(step*=mult);
     
   }
 
Vladimir Simakov:

Something's wrong, first on asc, next 200, 600

Need first on the asc, next 100, 200 from the previous one

 
Vitaly Muzichenko:

Something's wrong, first on asc, next 200, 600

The first one's an asc, the next one's 100, 200 from the previous one.

Do I add 100 each time or do I multiply by 2?

I corrected it there.

 
Vladimir Simakov:

Should I add 100 each time or multiply by 2?

That's the way it should be, corrected.

 
Vitaly Muzichenko:

That's the way it should be, corrected.

double step=100*Point,price=Ask,mult=2.0;
for(int i=0; i<5; i++) {
    SetArrowPrice(0,"Pos"+(string)i,TimeCurrent(),price,clrDodgerBlue);
    price+=step;
    step*=mult;}
 
Vladimir Simakov:

Thank you, that option worked!

Reason: