Announcement

Collapse
No announcement yet.

Time market open indicator

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

  • Time market open indicator

    Hi all,
    I have been looking at some things on a 24 hour chart and I would like to show one bg color bar and 520 pst. I looked around the file share and tried using the formula wizard but I couldn't get it to work. Can anyone tell me where I when wrong?

    Thank you,
    Chris


    PHP Code:
    var vLastAlert = -1;

    function 
    preMain() {
        
    setPriceStudy(true);
        
    setStudyTitle("time");

    }

    function 
    main() {
            if (
                
    getHour() == &&
                
    getMinute() == 20
            
    onAction1();

        return 
    null;

    }

    function 
    postMain() {

    }

        function 
    onAction1() {
            
    setBarBgColor(Color.RGB(255,0,255));
            
    vLastAlert 1;
        } 

  • #2
    Chris
    The enclosed revision should do what you want
    Alex

    PHP Code:
    var vLastAlert = -1;

    function 
    preMain() {

        
    setPriceStudy(true);
        
    setStudyTitle("time");
        
    setShowCursorLabel(false);
    }

    function 
    main() {
            
        if ((
    getHour()*100)+getMinute() == 520)
            
    onAction1();

        return 
    null;
    }

    function 
    onAction1() {
            
    setBarBgColor(Color.RGB(255,0,255));
            
    vLastAlert 1;

    Comment


    • #3
      Thats perfect. Thank you Alex.

      Comment

      Working...
      X