Code simple simple for understand the language of esignal :
Example :
I want to make one average of Close and one average of the average of close:
Tradestation is:
Var:sma1(0)sma2(0),mm3(0),s_sma(0),s_sma2(0),s_sma 3(0);
sma1= average(Close,14);
sma2= average(Close,20);
s_sma = (sma1 + sma2); //add
s_sma2 = average(s_sma,2); //average of add
s_sma3 = average(s_sma2,2);
// duble average(of average of add)
plot(s_sma3);
___________________________
In tradestation work perfectly but not in esignal :
code esignal:
function preMain() {
setPriceStudy(false);
setStudyTitle("MA of PVI");
setCursorLabelName("PVI",0);
setCursorLabelName("MAofPVI",1);
setDefaultBarFgColor(Color.blue, 0);
setDefaultBarFgColor(Color.red, 1);
}
function main(Length,Lengthn){
var sma1 = sma(14);
var sma2 = sma(20);
var s_sma = (sma1 + sma2);
var s_sma2 = sma(2,s_sma);
var s_sma3 = sma(2,s_sma2);
return (s_sma3);
}
Error:
Example :
I want to make one average of Close and one average of the average of close:
Tradestation is:
Var:sma1(0)sma2(0),mm3(0),s_sma(0),s_sma2(0),s_sma 3(0);
sma1= average(Close,14);
sma2= average(Close,20);
s_sma = (sma1 + sma2); //add
s_sma2 = average(s_sma,2); //average of add
s_sma3 = average(s_sma2,2);
// duble average(of average of add)
plot(s_sma3);
___________________________
In tradestation work perfectly but not in esignal :
code esignal:
function preMain() {
setPriceStudy(false);
setStudyTitle("MA of PVI");
setCursorLabelName("PVI",0);
setCursorLabelName("MAofPVI",1);
setDefaultBarFgColor(Color.blue, 0);
setDefaultBarFgColor(Color.red, 1);
}
function main(Length,Lengthn){
var sma1 = sma(14);
var sma2 = sma(20);
var s_sma = (sma1 + sma2);
var s_sma2 = sma(2,s_sma);
var s_sma3 = sma(2,s_sma2);
return (s_sma3);
}
Error:
Comment