help to how can convert data int to double,and how can replace the automatique order

 
I encountered a disclaimer while writing an expert advisor that I don't understand. I have some ideas on why I am getting it, but I was hoping someone could clarify. I am getting the possible data loss warning due to a type conversion warning  and orders no longer take automatically
while compiling the attached code.
Files:
ST10.mq5  14 kb
 
declaration of 'Signal' hides global variable
At line 87
string Signal = "Waiting";
should be 
At line 87
Signal = "Waiting";
You already declared signal in the header (line 45), variables declared outside functions is visible in all the code, And you can't declare it twice .

possible loss of data due to type conversion from 'double' to 'int'
At line 148

K = KArray[0];
D = DArray[0];
The array hold double values of the stochastic, you're trying to assign these values into an integer variable.
What the metaeditor is trying to tell you is if the KArray have a value of 0.365, the K variable will only hold 0, if it's 1.523, the K variable will only hold 1.
  • As int type only holds Integer numbers, while double can hold floating-point numbers(which are the numbers after the decimal point)
To solve this you should change the data type of K and D at line 47 to double