Announcement

Collapse
No announcement yet.

Plot after a specified time?

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

  • Plot after a specified time?

    HI,

    I am trying to put code in to plot lines only after a specified time ... say 10:30 but this code is causing LOTS of instability with eSignal ... it crashes.

    ((getHour()*100)+getMinutes() > 1030)

    Any help would be appreciated!!

    prawles

  • #2
    prawles
    You may need to post the whole code because that line alone is not sufficient to determine what could be causing the problem.
    Anyhow the sample code enclosed below draws a circle on every bar after 10:30 and works without problems
    Alex

    PHP Code:
    function preMain(){
        
    setPriceStudy(true)
    }

    function 
    main(){
        if((
    getHour(0)*100)+getMinute(0)>1030){
            
    drawShape(Shape.CIRCLE,BelowBar1,Color.red,"circle"+getCurrentBarCount());
        }    

    Comment


    • #3
      I was adding the code below as a condition to the if statement.......


      if (PlotxIB) {
      drawLineRelative( FirstBar, vXIBHigh, 0, vXIBHigh, PS_DASH, 2, Color.paleyellow, 3) // X IB High
      drawTextRelative( 4, vXIBHigh, vXIBHigh.toFixed(2)+" (" + vxIB + "xIB High) @URL=EFS:callES", Color.black, Color.paleyellow, Text.VCENTER|Text.BOLD|Text.FRAME, null, 8, 11);
      drawLineRelative( FirstBar, vXIBLow, 0, vXIBLow, PS_DASH, 2, Color.paleyellow, 4) // X IB Low
      drawTextRelative( 4, vXIBLow, vXIBLow.toFixed(2)+" (" + vxIB + "xIB Low) @URL=EFS:callES", Color.black, Color.paleyellow, Text.VCENTER|Text.BOLD|Text.FRAME, null, 8, 12);
      }

      Comment


      • #4
        prawles
        I can't see anything in that snippet of code that could be the cause of the problem. In order for someone to be able to offer some guidance you need to post a complete code example that illustrates the problem
        Alex

        Comment

        Working...
        X