Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 47

 
sannin:


Hello, help me please help me if I need the variable sig=1 to remember the balance and not to change its value no matter how much it will show next, and if sig=1 again to remember the current one please tell me the code

agree

Everybody's a smart-ass.

I'm sorry... the thing is, I've been dreading the task for two days...

I wouldn't ask for help.

I don't know how you manage the flag sig. Do it this way:

    if (сиг == 1) {pol = AccountBalance(); сиг = 0;}
 
TarasBY:

I don't know how you manage the sig flag. Do it this way:


Thank you

That's weird. I tried that. It didn't work...

Now it's working. It's maddening.

 
Merincool:


Sorry, thanks for the answer.

Does anyone have any code for drawing objects, I'm not good at coding, I can just figure out what's where and paste it into my code, but I don't think I can write it myself.

I would be VERY grateful.


If there are enough indicator buffers, you can do it without objects
[Deleted]  
Hello. Why when replacing Alert variable in the indicator with SendNotification there are some strange errors. I had to remove the output of currency type from the message, only the text like "Buy" "Sell" was left and then these errors don't appear during compilation.
[Deleted]  
Good afternoon. Could you please advise how to display, for example, fractals of a higher period on a one-minute timeframe, say, a five-minute period? What should the indicator buffer be equal to?
I have tried this code, but it doesn't work properly.
int TF=5;
for(int i=0; i<500; i++)   
{  
 ExtMapBuffer1[TF*i]=iFractals(NULL, TF, MODE_UPPER, i);
      
 ExtMapBuffer2[TF*i]=iFractals(NULL, TF, MODE_LOWER, i); 
}  
 
Aizec:
Good afternoon. Could you please advise how to display, for example, fractals of a higher period, say, a five-minute one, on a one-minute timeframe? What should the indicator buffer be equal to?
I tried such a code, but it does not work properly.
To display a fractal, it should be found first (as you can guess, not every bar has fractals). And bar synchronization (on different TFs) is done by time.
 
Aizec:
Good afternoon. Could you please advise how to display, for example, fractals of a higher period on a one-minute timeframe, say, a five-minute period? What should the indicator buffer be equal to?
I have tried this code, but it doesn't work properly.
int TF=5;
Holy shit! We got a scroll!
[Deleted]  

TarasBY:
Чтобы отобразить фрактал, его нужно сначала найти (фракталы, как можно догадаться, есть не на каждом баре). А синхронизация баров (на разных TF) производится по времени.

Thanks, of course, for the valuable advice, but the iFractals function isjust looking for fractals.

int TF=5;
for(int i=0; i<500; i++)   
{  
 ExtMapBuffer1[TF*i]=iFractals(NULL, TF, MODE_UPPER, i);
      
 ExtMapBuffer2[TF*i]=iFractals(NULL, TF, MODE_LOWER, i); 
}  

I need an example of working code, or may be you have a link to an indicator that already has it in Code Base.

 
The advisor does not handle ticks. Took the programme from the textbook as an example:
int Count=0;                                    // Глобальная перемен.
//--------------------------------------------------------------------
int start()                                     // Спец. ф-ия start()
   {
   double Price = Bid;                          // Локальная перемен.
   Count++;
   Alert("Новый тик ",Count,"   Цена = ",Price);// Сообщение
   return;                                      // Выход из start()
   }
//--------------------------------------------------------------------
int init()                                      // Спец. ф-ия init()
   {
   Alert ("Сработала ф-ия init() при запуске"); // Сообщение
   return;                                      // Выход из init()   
   }   
//--------------------------------------------------------------------
int deinit()                                    // Спец. ф-ия deinit()
   {
   Alert ("Сработала ф-ия deinit() при выгрузке");// Сообщение
   return;                                      // Выход из deinit()
   }
//--------------------------------------------------------------------
Alerts on initialisation and deletion are output. When the price changes, it does not. What could be the problem?
 
Aizec:
The iFractals() function just calculates fractals (but I see it's the same for you)... Dig around (for starters).