Moderator: admin
double MathTanh(double x)
{
double exp;
double returnNum;
if(x>0)
{
exp=MathExp(-2*x);
returnNum= (1-exp)/(1+exp);
return (returnNum);
}
else
{
exp=MathExp(2*x);
returnNum=(exp-1)/(1+exp);
return (returnNum);
}
}
struct TestStruct
{
int value1;
double value2;
string value3;
};
TestStruct Test[]
ArrayResize(Test, 100); // Give it a size of 100
ArraySetAsSeries(Test, true); // Turn the array around so the element 0 is the far right one
// Set the array to read from left to right as a normal array does
ArraySetAsSeries(Test, false);
// Add a new empty element to the end
ArrayResize(Test, 101);
// Set the array to read from right to left similar to the bars on a chart
ArraySetAsSeries(Test, true);
// Now the array has been turned around delete the last element
ArrayResize(Test, 100);
Return to Indicator Development
Users browsing this forum: No registered users and 8 guests