Announcement

Collapse
No announcement yet.

Yesterdays Hi Low Close

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

  • Yesterdays Hi Low Close

    Is there any way of making 3 lines that show the previous trading day's HIGH, LOW, and CLOSE on the Current Days Chart.

    And being able to adjust the Thickness and Color of the lines

    Thanks

  • #2
    apples&pears

    This isnt the most elegant solution, but it works for me for high and low, today's and yesterday's

    function preMain() {
    setPriceStudy(true);
    setStudyTitle("Today's High (TH)");
    setCursorLabelName("TH");

    //setDefaultBarStyle(PS_DASH);
    setDefaultBarFgColor(Color.green, 0);
    setDefaultBarThickness(2, 0);
    setPlotType(PLOTTYPE_FLATLINES, 0);
    setDefaultBarFgColor(Color.red, 1);
    setDefaultBarThickness(2, 1);
    setPlotType(PLOTTYPE_FLATLINES, 1);
    setDefaultBarFgColor(Color.grey, 2);
    setDefaultBarThickness(0, 2);
    setPlotType(PLOTTYPE_FLATLINES, 2);
    setDefaultBarFgColor(Color.grey, 3);
    setDefaultBarThickness(0, 3);
    setPlotType(PLOTTYPE_FLATLINES, 3);
    }

    var bInit = false;
    var xHigh = null;
    var xLow = null;

    function main() {

    if(isMonthly() || isWeekly() || isDaily())
    return;

    //if(bInit == false){
    if ( getBarState() == 0 ) {
    xHigh = high(-1,inv("405"));
    xLow = low(-1,inv("405"));
    xHighx = high(0,inv("405"));
    xLowx = low(0,inv("405"));
    addBand(xHigh, PS_SOLID, 2, Color.green, "TagName1")
    addBand(xLow, PS_SOLID, 2, Color.red, "TagName2")
    addBand(xHighx, PS_SOLID, 1, Color.grey, "TagName3")
    addBand(xLowx, PS_SOLID, 1, Color.grey, "TagName4")
    }
    //bInit = true;
    //}

    //var vHigh = getSeries(xHigh);
    //var vLow = getSeries(xLow);

    return //new Array (xHigh, xLow, xHighx, xLowx);
    }

    Comment


    • #3
      Hi

      Thanks for that code. I am currently on a 2 month free trial of Tradestation which expires on 25th December after previously being an eSignal user.

      FWIW after using both platforms I find that eSignal advanced charts are better visually than Tradestation Charts and the forming patterns are viewable and reveal themselves much earlier. Important for daytrading. Tradestation candles don't even have outlines so you are pretty much restricted to Black Background Charts......depressing when you stare at it 6 hours a day

      Also I prefer the Level 2 window in eSignal which again is more visual than tradestation

      So when the freebie expires I shall return to eSignal

      Just my 2 pennyworth

      Regards
      Jeff

      Comment

      Working...
      X