[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 426

 
prom18:

Like this?


It doesn't work.

 
hoz:

I need to display a bunch of mash-ups in the chart window...

Like this?


Yes, that's right - just build the right system, then 'template' - 'save'. If I need them, I hang the ready-made template, not the mashups.

 

Run the script, MyTemplate.tpl appears in the experts/files folder, move it to the templates folder, apply it to the graphic (right-click on the graphic - templates...).

Files:
tplgen.mq4  4 kb
 
gyfto:

Like this?


Yes, that's right - just build the system you want, then "template" - "save". If I need them, I hang a ready-made template, not a mashup.


This is already a perversion. I have 10 tukes essentially. Sort of like a bolinger on the fibo levels. And with billions of lines, let the artists indulge...

Still, I'd like to learn bypassing the template. I use templates myself, on occasion. This is a different situation. You need to draw with an indicator.

 
prom18:

It doesn't work



OrderDelete - operating logic
 
Integer:

Run the script, MyTemplate.tpl appears in the experts/files folder, move it to the templates folder, apply it to the graphic (right-click on the graphic - templates...).


Wow. I always thought that the buffer is used to display the value of some calculation. And the calculation is already passed from a variable or an array or whatever. And here I'm already a bit confused.
 
hoz:

Wow. I always thought that the buffer is used to display the value of some calculation. And the calculation is transferred from a variable or an array or whatever. And here I'm already a bit confused.


It is the same as not putting several indicators on the chart, saving the template, then using the template. But the indicators are not attached manually, instead a template is created programmatically with a note that there should be 100 averages on the chart.

Indicator buffers are properly understood.

 
Integer:

Run the script, MyTemplate.tpl appears in the experts/files folder, move it to the templates folder, apply it to the graphic (right-click on the graphic - templates...).

Wow. Plus all the familiar functions from the library))) Thanks!
 
Integer:


It's the same as not attaching several indicators to a chart, save the template, then use the template. But only the indicators are not attached manually, instead a template is created programmatically where it is written that there should be 100 averages on the chart.

About the indicator buffers is correctly understood.

Actually, yes, it's a clever approach. As I understand it, it is applicable to such moments, when there is a repeated call of some inductor. And if all those indices that calculate everything, then there is no need to have a separate indicator for this purpose... Well done! Thank you for the constructive answer. I've been poking around since the morning and it's all wrong.

gyfto:
Wow. Plus all the familiar functions from the library))) Thanks!


YES!

 
Good afternoon! The function, when called, swears that it expects a parameter of type string. Where does it get the string? Actually, I've been using this function for years and it didn't complain. I've just split it in two parts - for buy and for sell.
int RasstawimSell(int Raz,double Dist_pervaya,double Dist_dalshaya,double TP, double SL,double Lot,int Magicnumber)
{                  

    double Price=0.0,TP_BUY=0.0,SL_BUY=0.0,Price_SELL=0.0,TP_SELL=0.0,SL_SELL=0.0;int Error=0;string errorcomment;
    
    
           Price_SELL= (Bid-Dist_pervaya*Point) ;  TP_SELL=Price_SELL-TP*Point;  SL_SELL=Price_SELL+SL*Point; 
           
   for(int Raz1=0;Raz1<Raz;Raz1++){
   
           Sleep(2000); RefreshRates();  for(int A=25;A>=0;A--){if(IsTradeAllowed())break;if(A==0) 
Comment(" эксперту не разрешено торговать или поток для выполнения торговых операций занят "); }           
                
           OrderSend (Symbol( ), OP_SELLSTOP,  Lot ,NormalizeDouble(Price_SELL, Digits), 5,
 NormalizeDouble( SL_SELL,Digits),   NormalizeDouble( TP_SELL,Digits), Magicnumber,  0, CLR_NONE);

   Price_SELL= (Price_SELL -Dist_dalshaya*Point) ;TP_SELL=Price_SELL-TP*Point;   SL_SELL=Price_SELL+SL*Point;
            Error=GetLastError();if (Error==0)
            
            {errorcomment = "Ошибка открытия ордера селлстоп  "  + " " + Symbol() +  " " + ErrorDescript(Error); 
        Print (errorcomment);return(Error);} 
                       }
                          
                        
   return(Error);
}