Intraday Time filter - page 3

 
Vladimir Karputov: That is, in the input parameters must be entered as a decimal number.
Or make it a string and convert it
But you won't be able to optimize it.


int binary_to_int(string s){
   int value=0;
   for(int iPos=0; iPos < StringLen(s); ++iPos){
      string bit = StringSubstr(s,iPos,1);
      if(bit == "1")  value = value * 2 + 1;
      else if(bit != "0") Print("Non-binary character in input bit field: '%s'", bit);
   }
   return value;
}
 
whroeder1:
Or make it a string and convert it
But you won't be able to optimize it.


Please, this topic is about EA wizard to be used be people who don't know coding. You are a bit off-topic.
 

hi, im also having difficulty entering the numbers for this field.

i do not want to trade on fridays, saturdays, and sundays.. what is the decimal number i have to enter


i got the following binary number 1000011, not sure if this is correct. help me out.


regards

 

i'm having difficulty with this as well. i would like trading to be disabled in the 23rd hour of a day only.


the binary number i get is 10000000000000000000000, is this correct??

 
Tafadzwa Nyamwanza:

i'm having difficulty with this as well. i would like trading to be disabled in the 23rd hour of a day only.


the binary number i get is 10000000000000000000000, is this correct??

Yes. The 23th hour being from 22:00 to 22:59
 

im starting to get the general idea of how the time filter works. i have one issue though. the binary converter on your calculater will not let you enter a zero as the first digit of your number, so what happens if the first lets say five positions of your number are zeros. does it affect the numerical value of the decimal output


let me know regards

 
Tafadzwa Nyamwanza:

im starting to get the general idea of how the time filter works. i have one issue though. the binary converter on your calculater will not let you enter a zero as the first digit of your number, so what happens if the first lets say five positions of your number are zeros. does it affect the numerical value of the decimal output


let me know regards

Of course not, leading zero are irrelevant.
 
Tafadzwa Nyamwanza:

i'm having difficulty with this as well. i would like trading to be disabled in the 23rd hour of a day only.


the binary number i get is 10000000000000000000000, is this correct??

hi alain, if i understand yo correctly the positions in this field run in reverse. i.e from 23, 22, 21 to 0 hours??
 

hello everyone,

one last question. in the bad day of week field are the days of the week also in reverse starting from saturday?

i.e.

Sat Fri Thur Wed Tues Mon Sun

0     1    2      3       4     5       6


or is it


Sun Mon Tues Wed Thur Fri Sat

0      1       2       3     4      5    6


Appreciate your comments

 
Well someone should have reminded me that binary numbers are read from right to left. Second grade math, I believe 😂 lol
Reason: