Questions from a "dummy" - page 159

 
220Volt:

Nah, something doesn't quite add up:

Alert: 5536.894855375933

Alert: 6536.894855375933

P.S. 5536 is very low. 308 should denote exactly the degree

Maybe an implicit conversion?
 

I understand 308 is the maximum value of the exponent, then overflow. Thanks for the answers.

P.S. As a conclusion - no one guarantees to keep the value in all 309 digits.

 

Looks like it. Thanks for asking :)

PS there are a lot of questions with doubles, in fact, like this, they need to be kept under control :)

 
Silent:

Is that correct?

10*308=3080
1.7976931348623158*3080=5536.894855375932664

No.

10^3 = 1000 .

10^308= 1000000000..... ( 308 zeroes )

 
Karlson:

No.

10^3 = 1000 .

10^308= 1000000000..... ( 308 zeros)

Got it, thanks.
 
Is it possible to run an indicator script?
 
Silent:
Is it possible to run an indicator script?
have you tried it or are you just curious?
 
sergeev:
Have you tried it or are you just curious?
I can't find it - is it possible or not? I need to throw several copies of the indicator on the chart with different parameters, I decided that the scripts with pre-populated parameters is the easiest option... No?
 

Yeah. Put it on the hotkeys.

#property script_show_inputs
input int MA_Period=100; //Период МА

void OnStart()
    { 
    int ind_h=iMA(_Symbol,_Period,MA_Period,0,MODE_EMA,PRICE_CLOSE);
     ChartIndicatorAdd(0,0,ind_h);
    }
 
Karlson:

Yeah. Put it on the hotkeys.

О. I thought hotkeys weren't that kind of thing. Thank you very much.