Hi there i have coded a formula which calls 3 formulas to check if the conditions are true....
i use the btma35, the stochrsi and the preffered stochastic...
i dont know if i can attach 3 files but i will test it
regards erilein
PHP Code:
function preMain() {
setPriceStudy(true);
setStudyTitle("Special - Ver. 2 Beta");
setDefaultBarFgColor(Color.blue,0);
setDefaultBarFgColor(Color.red,1);
}
var study = new MAStudy(35,0, "OHLC/4", MAStudy.WEIGHTED);
function main() {
//-AUSGABE-
var out = 0;
//-Ausgabe-
var a = -1;
var sBTMA = 3;
var sPREF = 3;
var v = study.getValue(MAStudy.MA);
var vRSI = -2;
var vStochRSI;
//PREF
var test = new Array(2);
test = call("/Eric/Pref.efs","main");
return new Array(test1,test2);
if (MAVtx<MAVt1x)
if (sPREF != 2)new Number(out - 1);
sPREF = 2;
if (MAVtx>MAVt1x)
if (sPREF != 1)new Number(out + 1);
sPREF = 1;
//BTMA
if(close() >= v) {
if (sBTMA != 1)new Number(out + 1);
sBTMA = 1;
}
if(close() < v) {
if (sBTMA != 2)new Number(out - 1);
sBTMA = 2;
}
//RSI
vStochRSI = call("/Eric/RSI.efs","main");
if(vStochRSI >= 100){
a = 1;
}
if(vStochRSI <= 0){
a = 0;
}
if(a == 1 && vStochRSI > 0){
//HOCH
if (vRSI != 1)new Number(out + 1);
var vRSI = 1;
}
if(a == 0 && vStochRSI < 100){
setBarBgColor(Color.RGB(255,0,0));
//RUNTER
if (vRSI != 2)new Number(out - 1);
var vRSI = 2;
}
//HAUPT!
if ( out <= -2 ){
setBarBgColor(Color.RGB(255,0,255));
Alert.addToList(getSymbol(), "Runter!", Color.RGB(0,0,0), Color.RGB(195,0,0));
}
if ( out >= 2 ){
setBarBgColor(Color.RGB(0,128,128));
Alert.addToList(getSymbol(), "Hoch!", Color.RGB(0,0,0), Color.RGB(0,255,0));
}
return vStochRSI;
return v;
}
i dont know if i can attach 3 files but i will test it
regards erilein
Comment