Skip to content

Q&A 59 | Highest high and yesterday’s highest high

A Gold Pass member asked the following question: 

“Is there a way to PLot the High/Low when:
1. the High of today compared to the high of yesterday.
if the high of today does not break the high of yesterday
Plot that value
if the high of today does break the high
Plot that value”

{ THIS INDICATOR IS PROVIDED IN THE HOPE THAT IT WILL BE USEFUL. HOWEVER, MARKPLEX CORPORATION ASSUMES 
NO LIABILITY FOR ANY DAMAGES, DIRECT OR OTHERWISE, RESULTING FROM THE USE OF THIS INFORMATION, AND NO 
WARRANTY IS MADE REGARDING ITS ACCURACY OR COMPLETENESS. USE OF THIS INFORMATION IS AT YOUR OWN RISK. 
THIS INDICATOR AND ASSOCIATED TECHNIQUES IS AN EXAMPLE ONLY, AND HAS BEEN INCLUDED SOLELY FOR 
EDUCATIONAL PURPOSES. MARKPLEX CORPORATION DOES NOT RECOMMEND THAT YOU USE ANY SUCH TRADING STRATEGIES, 
INDICATORS, SHOWME STUDIES, PAINTBAR STUDIES, PROBABILITYMAP STUDIES, ACTIVITYBAR STUDIES, FUNCTIONS 
(OR ANY PARTS THEREOF) OR TECHNIQUES. THE USE OF THIS INDICATOR DOES NOT GUARANTEE THAT YOU WILL MAKE 
PROFITS, INCREASE PROFITS, OR MINIMIZE LOSSES.}

{ Is there a way to PLot the High/Low when:
1. the High of today compared to the high of yesterday.
if the high of today does not break the high of yesterday
Plot that value 
if the high of today does break the high 
Plot that value}

Var:	HighestH( 0 ),
		YestHighestH( 0 );

// Each new day set YestHighestH to yesterday's HighestH and reset the HighestH
If D <> D[1] Then
Begin
	YestHighestH = HighestH;
	HighestH = H;	
End;

// If the current bars high is higher than the day's running high, then set running high
// to this new value
If H > HighestH then HighestH = H;

If HighestH < YestHighestH then Plot3( YestHighestH, "Comb", Cyan )
else Plot3( HighestH, "Comb", Magenta );

//Plot1( HighestH, "HighestH", Red );
//Plot2( YestHighestH, "YestHighestH", Green  );

{ ** Copyright (c) 2024 Markplex Corporation. All rights reserved. **
** Markplex Corporation reserves the right to modify or overwrite this 
analysis technique on its https://markplex.com Web site. ** }