Announcement

Collapse
No announcement yet.

TRIN data problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TRIN data problem

    i've built an strategy that plots NYSE TRIN (as a line), and when i plote it for instance in a 5 minutes chart the TRIN data starts 19 bars late, here is part of the 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 = "5" // 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 suggestion will be much appreciated

  • #2
    Re: Reply to post 'TRIN data problem'

    I would add a line

    debugPrintln(vtime.getHours()+" " + vtime.getMinutes());

    just before

    var tag1 = 60 * vtime.getHours() + vtime.getMinutes();

    and see what time the computer thinks it is.

    ----- Original Message -----
    From: <[email protected]>
    To: <[email protected]>
    Sent: Thursday, January 09, 2003 11:24 AM
    Subject: Reply to post 'TRIN data problem'


    > Hello dloomis,
    >
    > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    >

    Comment

    Working...
    X