V11 dynamic rectangle from moving average breakout zone to any future bar

v11
V11 dynamic rectangle from moving average breakout zone to any future bar

A request was made in the Probuilder forum, to display a rectangle starting from the price crossing a moving average 20 and continuing to the right of the price thanks to v11 new capability, with same height as breakout candle, and only showing the latest active occurrence.

continuer dessin vers la droite

Use N as how many bars to the right of the latest price you want to extend the rectangle to.

Use period to customise the moving average

It is not much to look at in terms of graphic output, but if you recently had an update to PRT v11, it shows you the simplest way to code a self-refreshing drawing in the present triggered by a single event in the past and still able to extend  in a constant way in the future no matter how long ago the triggering event was.

Therefore you can use the concept and easily adapt the code with something else than a moving average to suit many other needs you may have to highlight anything.

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. Roland57800 • 01/03/2021 #

    Bonjour Noobywan,

    si je comprends bien l’utilisation de ce code que je trouve particulièrement intéressant,
    on achète de suite au dessus du rectangle qui correspond donc au breakout et à l’inverse sous le rectangle pour une vente

    C’est bien ça.
    Merci pour une confirmation
    Cordialement

    • Noobywan • 01/03/2021 #

      Bonjour, quand la question a été posée dans le forum à celui qui avait fait la requête en amont du code (lien ci-dessus dans le texte “continuer dessin vers la droite”), il n’y a pas eu à ce jour de réponse sur la façon dont il l’utilisait. Je me garderai bien de répondre à sa place sur ses intentions. Je peux juste ajouter qu’à titre personnel je n’utilise pas un franchissement de moyenne mobile comme signal d’un trade ou sa trace passée comme signal du trade opposé, ni les stratégies de breakout. Et que c’était une requête probablement davantage graphique que de trading systématique. L’intérêt graphique du code était fin 2020 au déploiement de la v11pour les comptes IG de montrer à tous les nouveaux utilisateurs v11 qui n’avaient pas encore en main les nouvelles possibilités quand le forum regorgeait de questions sur celles-ci, qu’on pouvait désormais grapher sur la droite du prix pas seulement de façon statique mais aussi dynamique.

  2. Fabian • 01/03/2021 #

    This Code draws only a retangle if the condition has been confirmed and NOT before (in that case a simple crosses over SMA)

    defparam DRAWONLASTBARONLY = true

    sma5 = Average[5](close)

    BeginnRechteck = 5
    EndeRechteck = 15
    Counter = LastSet($RechteckStartBar) + 1

    if barindex > 1 and (close[1] crosses over sma5[1]) then
    ObereSeite = close[1] + 40 * pipsize
    UntereSeite = close[1]

    // Speichert die Koordinaten des Rechtecks in Array-Variablen
    $RechteckStartBar[Counter] = barindex – 1 + BeginnRechteck
    $RechteckEndBar[Counter] = barindex – 1 + EndeRechteck
    $RechteckObereSeite[Counter] = ObereSeite
    $RechteckUntereSeite[Counter] = UntereSeite

    // Aktualisieren des Zählers
    Counter = Counter + 1
    endif

    // Zeichnet alle gespeicherten Rechtecke im Chart
    for i = 0 to LastSet($RechteckStartBar) do
    DRAWRECTANGLE($RechteckStartBar[i], $RechteckObereSeite[i], $RechteckEndBar[i], $RechteckUntereSeite[i]) coloured(0, 0, 255, 20) bordercolor(0, 0, 150)
    next

    return

    https://ibb.co/Fsqh4bj

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Oxxoz Re bonjour Vivien, Il me smeble que 3 mois, c'est 60 séances. Cordialement,
Vinks_o_7 thanks ...and It can be used on a monthly and weekly basis by changing just the duration in ...
nicko Many Thanks Viv. It looks good
Nokis Bonjour Vivien, Comment je peux faire pour adapter ton code afin: De cibler les sociétés q...
sam00075 I tried it today and it gave great results. So a big Thanks !
Bard Hi @Vonasi, this is an excellent tool! I noticed you times by 180 and was wondering why? W...
Bard I have no idea what is wrong with the posting on this website. I have problems editing posts...
Bard And now my first post displays okay? It literally had copies of my orig post all added toget...
frenqle Hi There.. It seems the TSL stop loss is not working.. it does not respond is that correct?
Ciccarelli Franco Per lasciare che la strategia venga eseguita (dopo aver importato il file): Basta eliminare...
JADINVEST Hello Jan, hello everyone, Thanks Jan for this strategy! Since 2020, have any of you found a...
carpentier Joffrey Bonjour à tous, Avant tout merci pour ce travail, cependant je suis bloqué quand je l'insta...
carpentier Joffrey Re, C'est ok, j'ai trouvé mon erreur... Cependant sur quel base peut on calculer son CALC...
Aragorna Hi Nicolas, How is it possible to use it in a higher timeframe plotted on a lower timeframe?...
FXmike hey my friends, thank you for this great code. my problem is he make no trade open. backtest...
FXmike Can i put a Action that my start contract is smaller than 1 ? 0.3 or 0.5 ? In wich Position...
phoentzs I wrote the code for M15 back then and also variants in H1 and M1. Everything works so far....
Alps007 Hi Nicolas. Happy New Year. Can you please program me several MACD divergence screeners ...
Arlei Zanin Hello Nicolas, would it be possible to convert the Cloud to Pascal language? Thank you.
ashee i want it in MT4
Marie-Eve Vergoz Bonsoir - Voici l'erreur qui est signalée lorsque je souhaite utiliser cet indicateur : il...
Vonasi Sure that is possible. I will code it and make a post in the English ProBuilder forum and pu...
Vonasi Vama v2 with Hull moving average included can be found here: https://www.prorealcode.com/top...
JMat45 Thank you, Vonasi.
Nicolas
5 years ago
LRMA
LRMA
0
Indicators
Vinks_o_7 Thanks again Vonasi !
Bard Thank you, this is a great tool @Vonasi, especially for those that used to like shorting Ind...
Aragorna Hi Vonasi, is there a reason why it does not work anymore in new version ePRT Platform? tha...
sycomore Ça ne fonctionne sur aucune valeur, je dois être trop con...
Nicolas il faut appliquer l'indicateur sur le prix.
AntoGH Je crains de ne pas comprendre... Cela indique la probabilité de la prochaine bougie ou donn...
manchokcity can we have it in mql4 platform? or how or which platform do we use it?
camporan I don't use MetaTrader so I won't be able to do the translation myself. Sorry!
Alexander9 This can for amibroker ? . Thanks
Alberto Aguilera Hi! Thanks for your strategy Anyone can check it with 200 bars?
TempusFugit Hi, this simple system for DOW and only shorts has worked quite well, maybe because of its q...
phoentzs Unfortunately, I never pursued this strategy further. Maybe I should take a look with what ...
robertogozzi It surely CHANGES even when currently outside time range, as the lookback periods change as ...
SkippyTrader Thanks Roberto, but shouldnt the values in the outside time range not be different? As it sh...
robertogozzi Actually it is a constant (I tested them on a 1-hour TF, 9am to 5pm) and outside that time r...
Vonasi Yes that was the issue. I have posted an updated ITF file here: https://www.prorealcode.com/...
crolakstrading @vonasi Thank you for fixing the issue! This is a great indicator.
gregoire good evening vonasi , I had made the request to create this indicator a few years ago and I ...
tobytarczy Hi Vonasi, Sounds lovely, I race yachts around europe myself. Most regattas cancelled unfor...
mlouys Hello Vonasi thank for your work ! A question how can we do it for minutes ( or 15 min or x ...
Vonasi I think that would be possible but probably in a whole new indicator as detecting when a new...
sir_i Bonjour à tous, Je suis nouveau sur le forum et sur la plateforme, pourriez-vous me dire com...
Nicolas Il faut simplement l'appliquer sur le prix.
sir_i Merci pour la réponse, je ne suis pas familier avec l'application de cette procédure simple,...
funkystuff Salut Balmora, Ton indicateur est plutôt intéressant :) Penses-tu qu'il soit possible de l'...
brian gilbert Hello, can you explain to me what are "pipsize" and "ATAN"? What functions do they have and ...
Bodaris Bonjour, Je suis débutant 1 mois :p pipsize ressemble à la fonction pointsize et ATAN...

Top