Announcement

Collapse
No announcement yet.

TickInBar

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

  • TickInBar

    Does anyone know how I can access the same data that appears for the TicksInBar value in the cursor window ? I am using a chart based on tick intervals and this information would be very helpful to me in my efs.
    Thanks -
    Jennifer

  • #2
    Re: Reply to post 'TickInBar'

    var tib=0;
    var alert=0;
    var beep;
    var intTime = getInterval();
    var intTimelen = intTime.length;
    var tick = intTime.charAt(intTimelen-1);
    var realInt= intTime.substr(0,intTimelen-1);
    var ok=0;

    function preMain(){
    setPriceStudy(false);
    setCursorLabelName("TIB Count");
    setPlotType(PLOTTYPE_HISTOGRAM);
    setDefaultBarFgColor(Color.white);
    if(tick!="T")
    return;
    }

    function main(pct, beep){

    if(pct==null)pct=80;
    if(beep==null)beep=1;
    //tib=getInterval()-1;
    if(getBarState()==BARSTATE_NEWBAR){ tib=0; alert=0; }

    if(tib>=realInt*pct/100 && alert!= 1){
    if(beep==1) Alert.playSound("C:\\Program
    Files\\eSignal\\Sounds\\Ding.wav")
    debugPrintln(tib+" Ticks >= "+pct+"% of "+realInt+"T");
    alert=1;
    }
    tib=tib+1;

    if(getCurrentBarIndex()!=0)tib=600;
    return tib;
    }
    ----- Original Message -----
    From: <[email protected]>
    To: <[email protected]>
    Sent: Wednesday, December 17, 2003 11:57 AM
    Subject: Reply to post 'TickInBar'


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

    Comment

    Working...
    X