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

 
gawara:
Hello all gentlemen... I've been googling for a long time but haven't found it... I have a question, there's a statment in html, it needs to be visualized on a graph for clarity, it seems to me from the point of view of programming it is possible, who has faced something like this please advise ... I think there must be some sort of script that does the job ... thanks in advance...

https://www.mql5.com/ru/code/10425
 

Friends!

Help, I can't figure it out...

How can I get a look:

if( profit>=0.10 && profit <=0.99) dp =1;

else

if( profit>=1.00 && profit <=9.99) dp =10;

else

if( profit>=10.00 && profit <=99.99) dp =100;

... and so on through the loop for( int i=0; i<=100000; i++)

Simply put, HOW to determine the number of decimal places left of the integer number (fractional is clear)?

 
nlp2311:

Simply put, HOW do you determine the number of digits of a whole number to the left of the decimal point (fractional Digits understandably)?


Look in MathXXX functions + include logic
 
Hello, Could you please write a code that will return the number of stolen orders daily?
 
nlp2311:

Simply put, HOW do you determine the number of digits of an integer to the left of the decimal point?

Try:

#property show_inputs
extern double pr=-100500.02;
//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start(){int S=0;int price=MathFloor(pr);if(pr<0)price=price+1;
  string P=price;S=StringLen(P);if(pr<0)S=S-1;Alert(S);return(0);}
 
nlp2311:

Friends!

Help, I can't figure it out...

How can I get a look:

if( profit>=0.10 && profit <=0.99) dp =1;

else

if( profit>=1.00 && profit <=9.99) dp =10;

else

if( profit>=10.00 && profit <=99.99) dp =100;

... and so on through the loop for( int i=0; i<=100000; i++)

Simply put, HOW to determine the number of decimal places left of the integer number (fractional is clear)?

int start()
   {
      double n=0.12345; //n - "исследуемое число"
      int dp; //dp - к-во чисел в целой части
      dp=0;
      while(n>=1.0)
         {
            n=n/10.0;
            dp++;
         }
      Alert(dp);
      return(0);
   }

 
Or so it goes:
int start()
   {
      double n; //n - "исследуемое число"
      int dp; //dp - к-во чисел в целой части
      dp=0;
      for(n=0.23567;n>=1.0;n=n/10.0) dp++;
      Alert(dp);
      return(0);
   }
 

Can you tell me how to implement this idea?

There is a zero (i.e. the first one on the right) hourly bar. Inside this bar there are 60 minute bars. Based only on the data of these one-minute bars you need to build an indicator of 2 lines according to the scheme:

1. At the new Low minutes from the beginning of the hour all Close prices are summed up from the beginning of the hour till the current moment, but not further than the end of the hour.

Also, counting from the beginning of the hour on the new High minutes summarize all prices Open minutes from the beginning of the hour until the current moment, but not beyond the end of the hour.

Thanks in advance!

 

Hi all. Can a function return multiple values (comma separated) ?

return(1,2)

Or is it nonsense? :)) I just need to specify lot and order price. It's not rational to write two functions for it.

 
MikeM:
Or so it goes:


thank you friends!
Reason: