mlsignups Posted July 11, 2021 Report Share Posted July 11, 2021 On the wishingwealth blog the guy there has created some simple indicators and one he calls the Green Line Brekaout (GLB). Essentially he draws a horizontal green line on a chart where a stock has hit a new high then pulled back for at least 3 months and is under that high; then he enters on a break of that line (at least in some cases). It's drawing a line at all time highs but only if the high was > 90 days ago. Is there a way to draw that horizontal line. Thanks Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted July 11, 2021 Report Share Posted July 11, 2021 This is for a historical chart, right? StateFIFOQueue Highs; Double AllTimeHigh = 0; public void MainCalculation() { AllTimeHigh = Math.Max(AllTimeHigh,High); Highs.Add(High); Double H,L; Highs.GetHighLow(out H, out L); SetColor("Line Color", Color.Green); if (H == AllTimeHigh) SetYValue(H); else SetYValue(YSkipValue); } /// <summary> /// Is called at start of paintbar calculation, should be used to initialize anything needed for the paintbar /// </summary> private void PaintbarInitialize() { Highs = new StateFIFOQueue(90); } /// <summary> /// Is called at start of paintbar calculation, should be used to clear the paintbar state /// </summary> private void PaintbarClearState() { Highs.Clear(); } /// <summary> /// Saves paintbar state (called internally). /// </summary> private void PaintbarSaveState() { Highs.SaveState(); } /// <summary> /// Restores paintbar state (called internally). /// </summary> private void PaintbarRestoreState() { Highs.RestoreState(); } Quote Link to comment Share on other sites More sharing options...
mlsignups Posted July 12, 2021 Author Report Share Posted July 12, 2021 Awesome; thanks. I'll give it a try - and use it was for a historical chart. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.