LOL here is my attempt, WARNING: It crashes my metatrader so don't load it. Open in the code editor, obviously I didn't do something right. Not seeing any error message.
Inserted Code
int EUpipValue = MarketInfo(EURUSD, MODE_TICKVALUE);
int UJpipValue = MarketInfo(USDJPY, MODE_TICKVALUE);
int EGpipValue = MarketInfo(EURGBP, MODE_TICKVALUE);
int UCpipValue = MarketInfo(USDCHF, MODE_TICKVALUE);
int NUpipValue = MarketInfo(NZDUSD, MODE_TICKVALUE);
int AUpipValue = MarketInfo(AUDUSD, MODE_TICKVALUE);
for (i=0; i<pairs; i++){
// if we fit a spread then all pairs except this one are on the other
// side (negative) and this one (the regressand) is 1 by definition
if (i == this){
coef[i] = 1;
}else{
coef[i] = -coef[i];
}
// convert to units
if (StringSubstr(symb[i], 0, 3) == "USD"){
coef[i] = coef[i] * iClose(symb[i], 0, 0);
}
if (StringSubstr(symb[i], 0,6) == "EURUSD"){
coef[i] = coef[i] * EUpipValue;
}
if (StringSubstr(symb[i],0,6) == "USDJPY"){
coef[i] = coef[i] * UJpipValue;
}
if (StringSubstr(symb[i],0,6) == "EURGBP"){
coef[i] = coef[i] * EGpipValue;
}
if (StringSubstr(symb[i],0,6) == "USDCHF"){
coef[i] = coef[i] * UCpipValue;
}
if (StringSubstr(symb[i],0,6) == "NZDUSD"){
coef[i] = coef[i] * NUpipValue;
}
if (StringSubstr(symb[i],0,6) == "AUDUSD"){
coef[i] = coef[i] * AUpipValue;
} DislikedYes but if I follow the precedent back only about 3 months do not need a precise calculation of backward but I need how to behave curve at that point by the given moment of the calculation.Ignored
Attached File(s)
Skype: heliosphan187