{"id":1255,"date":"2016-01-25T07:25:29","date_gmt":"2016-01-25T12:25:29","guid":{"rendered":"http:\/\/www.amibroker.com\/kb\/?p=1255"},"modified":"2016-01-28T07:25:39","modified_gmt":"2016-01-28T12:25:39","slug":"how-to-read-highest-high-value-of-future-bars","status":"publish","type":"post","link":"https:\/\/www.amibroker.com\/wordpress\/kb\/2016\/01\/25\/how-to-read-highest-high-value-of-future-bars\/","title":{"rendered":"How to read highest high value of future bars"},"content":{"rendered":"

Built in HHV<\/strong> and LLV<\/strong> functions allow to read highest high or lowest low of n-past bars. If we want to refer to future values, there is an easy way to do it using simple Ref<\/strong> function and just shift HHV or LLV reading from N-bars ahead. A ready to use function showing such approach is presented below:<\/p><\/span>\/\/ function definitions
<\/span>function <\/span>futureHHV<\/span>( array, <\/span>periods <\/span>)
{
   return <\/span>Ref<\/span>( <\/span>HHV<\/span>( array, <\/span>periods <\/span>), <\/span>periods <\/span>);
}
function <\/span>futureLLV<\/span>( array, <\/span>periods <\/span>)
{
   return <\/span>Ref<\/span>( <\/span>LLV<\/span>( array, <\/span>periods <\/span>), <\/span>periods <\/span>);
}

<\/span>\/\/ sample use
<\/span>Plot<\/span>( <\/span>Close<\/span>, <\/span>"Close"<\/span>, <\/span>colorDefault<\/span>, <\/span>styleBar <\/span>);
<\/span>Plot<\/span>( <\/span>HHV<\/span>( <\/span>H<\/span>, <\/span>20 <\/span>), <\/span>"HHV"<\/span>, <\/span>colorGreen<\/span>, <\/span>styleDashed <\/span>);
<\/span>Plot<\/span>( <\/span>futureHHV<\/span>( <\/span>H<\/span>, <\/span>20 <\/span>), <\/span>"Future HHV"<\/span>, <\/span>colorGreen<\/span>, <\/span>styleThick <\/span>);
<\/span>Plot<\/span>( <\/span>LLV<\/span>( <\/span>L<\/span>, <\/span>20 <\/span>), <\/span>"LLV"<\/span>, <\/span>colorRed<\/span>, <\/span>styleDashed <\/span>);
<\/span>Plot<\/span>( <\/span>futureLLV<\/span>( <\/span>L<\/span>, <\/span>20 <\/span>), <\/span>"Future LLV"<\/span>, <\/span>colorRed<\/span>, <\/span>styleThick <\/span>)<\/code>

And here is the chart produced by the formula above:<\/p>

\"Future<\/p>","protected":false},"excerpt":{"rendered":"

Built in HHV and LLV functions allow to read highest high or lowest low of n-past bars. If we want to refer to future values, there is an easy way to do it using simple Ref function and just shift HHV or LLV reading from N-bars ahead. A ready to use function showing such approach […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[53,55,82,81,84,83],"_links":{"self":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1255"}],"collection":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/comments?post=1255"}],"version-history":[{"count":1,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1255\/revisions"}],"predecessor-version":[{"id":1257,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/posts\/1255\/revisions\/1257"}],"wp:attachment":[{"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/media?parent=1255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/categories?post=1255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.amibroker.com\/wordpress\/kb\/wp-json\/wp\/v2\/tags?post=1255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}