i got this problem every time plot this formula The TRIN indicator start 19 bars late (5m chart), also the same problem in any other time frame.
part of the formulla formula:
function main() {
var f = call("/Downloads/VIDYA.efs");
var Slow_MA = MASlow.getValue(MAStudy.MA);
var nTrinLong = 1.40; // Habilita Long bajo esto
var nTrinShort = 0.70; // Habilita Short por sobre esto
var marcotiempo = "1" // Intervalo de la Carta
var nBarState = getBarState();
if (nBarState == BARSTATE_ALLBARS){
vSymbol = "$TRIN," + marcotiempo ;
}
if ( f == null || Slow_MA == null)
return;
var nTRIN = close(0, 1, vSymbol);
if (nTRIN == null)
return;
//* var nBarState2 = getBarState();
//* if (nBarState2 == BARSTATE_ALLBARS){
//* vSymbol2 = "$TICK,1";
//* } *//
// var nTICK = close(0, 1, "$TICK,5");
// if (nTICK == null)
// return;
var vtime = getValue("Time");
if (vtime == null)
return;
var tag1 = 60 * vtime.getHours() + vtime.getMinutes();
if(tag1 >= 720 && tag1 <= 810) {
tag2 = 1;
} else tag2 =0;
any ideas?
best regards
part of the formulla formula:
function main() {
var f = call("/Downloads/VIDYA.efs");
var Slow_MA = MASlow.getValue(MAStudy.MA);
var nTrinLong = 1.40; // Habilita Long bajo esto
var nTrinShort = 0.70; // Habilita Short por sobre esto
var marcotiempo = "1" // Intervalo de la Carta
var nBarState = getBarState();
if (nBarState == BARSTATE_ALLBARS){
vSymbol = "$TRIN," + marcotiempo ;
}
if ( f == null || Slow_MA == null)
return;
var nTRIN = close(0, 1, vSymbol);
if (nTRIN == null)
return;
//* var nBarState2 = getBarState();
//* if (nBarState2 == BARSTATE_ALLBARS){
//* vSymbol2 = "$TICK,1";
//* } *//
// var nTICK = close(0, 1, "$TICK,5");
// if (nTICK == null)
// return;
var vtime = getValue("Time");
if (vtime == null)
return;
var tag1 = 60 * vtime.getHours() + vtime.getMinutes();
if(tag1 >= 720 && tag1 <= 810) {
tag2 = 1;
} else tag2 =0;
any ideas?
best regards
Comment