Ensign volatility stop

Ensign volatility stop

This is a code converted from AFL and based on a volatility stop originally developed by Ensign, now public domain.

Benefit of this stop: parametrable “elasticity” in order to avoid early stop-out within existing trend- this stop “absorbs” the inevitable little pullbacks of the prices.

But, drawbacks of my converted code – and here I am keenfully awaiting the help of Nicolas:

it takes literally forever for the code to chart (45 secondes of calculation on my very fast machine) before charting. And when using Defparam calculate on last x bars, it doesn’t help really.  Is there a way to make this code much quicker?

I didn’t find the equivalent of AFL “Null” instructions: in this case, it would be used in the calculation of upline and dnline for the value given after the “else” condition. “Null” then generates NO plotting of the indicator. Due to that, I had to use the “coloured” params to try make the indicator invisible on the chart (white colour on a white background chart) but it is not very “handsome”

Enjoy this nice indicator, and thank you for any improvement/help.

PRT code for EnsignVolatStop

 

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Denis • 01/04/2022 #

    Hello,
    Very interesting indicator, many thanks.
    But I confirm that it takes way too long to load, a minute or more.
    When I activate Defparam by deleting “//”, nothing appears.
    Nicolas, you who are always a great help, do you have an idea to solve this problem please?
    Thanking you in advance for your precious help

  2. CederTrader • 01/04/2022 #

    Hi Denis, does this indicator add to the chart as panel, or on the candles. Thanks

    • Nicolas • 01/04/2022 #

      Add it on the price chart as described in this video: https://www.prorealcode.com/blog/video-tutorials/how-to-add-an-indicator-on-price-prorealtime/

  3. Denis • 01/04/2022 #

    Hello Nicolas and Ceder Trader,
    Sorry, I only just saw your replies.
    The indicator is already well established on the prices, so the problem does not come from there

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Pelle Nævestad Thanks Nicolas, this is a keeper!
Chicane23 Hi, when uploaded the WAE isnt showing histogram; only line. Is there a way to modify?
Nicolas Change the way the lines are displayed in the indicator settings window : histogram, lines, ...
Dimi.A Perfect for counter-trend scalping. I like this!
viktorthuns Hi Nicolas! Great work you've done with all your indicators. Just wondering about the code a...
Nicolas the value is not a boolean but an average of an addition of booleans. As stated in the descr...
denmar Hi Could somebody please enlighten me how this code operates. I wish to use the code (is...
denmar Testing email notification to Denmar
David Black #gm74 Did you ever get this figured out? gm74
sr021 Hi I tried to copy and paste the code, but recieve the message  : Syntax error:The followi...
Nicolas Hello, of course. You have 3 options : 1/ you download the file and import it into your plat...
r.angel It seems that the formula needs a SQRT (that is Vyangzhang = SQRT(...))
RickTrader I think to have annualized view of this historical volatility you will need : Vyangzhang =...
Sofitech Bonjour. J'aimerais savoir s'il est possible de "truquer" un peu l'indicateur pour qu'il don...
Maz I actually like this very simple idea. It can also be useful for market micro-structure syst...
Nicolas Thanks Maz, I'll have a look tomorrow.

Top