having trouble converting double to int then back to double - page 2 12 New comment imjeffd 2018.11.08 07:23 #11 Feng Guozheng: damn! such this problem i havd sloved , just by using the same code showed at the first post. i know the issus about the float/double,why it is so difficult for you?beats me you can run the indicator your self if you like Guo Zheng Feng 2018.11.08 15:57 #12 imjeffd: beats me you can run the indicator your self if you like Ok,here we go~ fist you need to know ,for easy to test,i do something to the code: double m1_IRS = iRSI(NULL,1,14,PRICE_CLOSE,0); m1_IRS=0.69;//for debugi forced the m1 is 0.69,whick will be stored as 0.689999999999999 the i change you code : ObjectSetText("m_1","M1 "+m1_IRS,9,NULL,m1color); into //ObjectSetText("m_1","M1 "+m1_IRS,9,NULL,m1color); //Original ObjectSetText("m_1","M1 "+MyDoubleNormalization(m1_IRS,0.01),9,NULL,m1color); //fixed the display so is your problem of #1 sloved ? :D i leave the other M*_IRS unchange and don't forget to comment/deleted the m1_IRS=0.69 ,if it is ok for you. Files: rsibot.mq4 17 kb Cycle While help me Coding help Trading Strategies Based On imjeffd 2018.11.08 18:06 #13 Feng Guozheng: Ok,here we go~ fist you need to know ,for easy to test,i do something to the code: double m1_IRS = iRSI(NULL,1,14,PRICE_CLOSE,0); m1_IRS=0.69;//for debugi forced the m1 is 0.69,whick will be stored as 0.689999999999999 the i change you code : ObjectSetText("m_1","M1 "+m1_IRS,9,NULL,m1color); into //ObjectSetText("m_1","M1 "+m1_IRS,9,NULL,m1color); //Original ObjectSetText("m_1","M1 "+MyDoubleNormalization(m1_IRS,0.01),9,NULL,m1color); //fixed the display so is your problem of #1 sloved ? :D i leave the other M*_IRS unchange and don't forget to comment/deleted the m1_IRS=0.69 ,if it is ok for you.seems good to me thanks 12 New comment
damn! such this problem i havd sloved ,
just by using the same code showed at the first post.
i know the issus about the float/double,why it is so difficult for you?
beats me you can run the indicator your self if you like
beats me you can run the indicator your self if you like
Ok,here we go~
fist you need to know ,for easy to test,i do something to the code:
double m1_IRS = iRSI(NULL,1,14,PRICE_CLOSE,0);
m1_IRS=0.69;//for debug
i forced the m1 is 0.69,whick will be stored as 0.689999999999999
the i change you code :
ObjectSetText("m_1","M1 "+m1_IRS,9,NULL,m1color);
into
//ObjectSetText("m_1","M1 "+m1_IRS,9,NULL,m1color); //Original
ObjectSetText("m_1","M1 "+MyDoubleNormalization(m1_IRS,0.01),9,NULL,m1color); //fixed the display
so is your problem of #1 sloved ? :D
i leave the other M*_IRS unchange and don't forget to comment/deleted the m1_IRS=0.69 ,if it is ok for you.
Ok,here we go~
fist you need to know ,for easy to test,i do something to the code:
double m1_IRS = iRSI(NULL,1,14,PRICE_CLOSE,0);
m1_IRS=0.69;//for debug
i forced the m1 is 0.69,whick will be stored as 0.689999999999999
the i change you code :
ObjectSetText("m_1","M1 "+m1_IRS,9,NULL,m1color);
into
//ObjectSetText("m_1","M1 "+m1_IRS,9,NULL,m1color); //Original
ObjectSetText("m_1","M1 "+MyDoubleNormalization(m1_IRS,0.01),9,NULL,m1color); //fixed the display
so is your problem of #1 sloved ? :D
i leave the other M*_IRS unchange and don't forget to comment/deleted the m1_IRS=0.69 ,if it is ok for you.
seems good to me thanks