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
darbes Hi How does it go on live ? JC
antonio73 Balmora74, io vedo che funziona anche su timeframe ad 1 minuto con piccole ottimizzazioni, t...
Juananantoniorodriguez hola buenas, a este sistema automático, Cómo se le podría poner un stoploss de beneficio sim...
Vonasi There is another version of this indicator that can plot the same lines but onto an indicato...
Martin35 Hello Vonasi, do you think it is possible with PRT to code with the same principle as on thi...
Leo I don't know, I just copy paste the strategy. The optimisation of the values I wrote them in...
bertrandpinoy hello Leo I'm spending time on your strategy code. do you agree to try to include this code ...
bertrandpinoy //version a: ajout filtre MM defparam cumulateorders=false // --- paramètres taille =...
capgros Bonjour @Nicolas, Thanks a lot for this tool, it is very useful for me. I would like to s...
Hans63 Would you add the possibility to color also the Heikin Ashi and bar chart?
Nicolas That's possible, please open a new topic in the indicator forum explaining what you need exa...
DimKar Dear sir , thank you very much for sharing !!!! it is awesome ...!!! Please can you tell me...
Nicolas Change line 62 with: drawcandle(flup,fldn,flup,fldn) coloured(169,169,169,80) bordercolor(16...
DimKar Thank you very much from Greece sir , have a nice day ....!!!! Really i do not have words...
ottimo Thank you Nicolas, great indicator, N. 1
tikigai Merci Nicolas! First Happy new Year 2020. Very good indicator BUT (yes the french "oui, m...
Nicolas Whats prorealtime version? Did you try in version prior to v11? indicator's call and loop ca...
Nicolas Yes, that's how it goes when using loops..
JosephFelix Hi, Could I please have help with adding these indicators 'on price'? Every indicator that I...
Nicolas Just add it on price by clicking the wrench on the left upper side of the price chart.
Paul the last update can be found in topic Strategy DayOpen Straddle for DAX on page 14.
bertrandpinoy l instruction GRAPH pose problème sur PRT... pas vous? cordialement
Nicolas Supprimer simplement les lignes avec GRAPH pour passer en ProOrder, trading live.
Nicolas Apply it on the price chart. The indicator plot just one single line. There are two in the...
jamesoc Hi Nicolas, do you happen to know if there is an indicator that can be applied to charts, to...
gustavobp Buenos dias Nicolas, al agregar tu indicador no me reconoce la variable Price ni en la linea...
fredfilm Hi Nicolas, how could we add a price screen to this? eg stock prices between $1 to $3 etc
tradingpro salve io faccio spread trading e volevo sapere come impostare un profitto da chiudere in a...
Nicolas Per favore non fare domande generali, non correlate al post. Usa invece il forum.
Bard Incredible, that is the clearest depiction of the trend I've ever seen Nicolas. (I just chan...
Appsoluxions Hi Nicolas, do you have the MT4 version of the indicator? I am not sure if these kind of que...
Nicolas Hi, don't have one sorry. But you can still ask for private coding through our programming s...
Appsoluxions Cool. Thanks for the response.
rama I want to use this indicator in trading system, it says zig zag is obsolete and not supported
Nicolas Right, due to its repainting behavior, the zigzag is not allowed in automated trading with r...
rama I noticed it changes as time progress, I am 7 as the average, how many period it wont chang...
Gordon101 Hi when I added your Guppy indicator to my chart it went below the chart beside the oscilla...
Nicolas Add it on the price by using the wrench located on the left upper side of your price chart.
Gordon101 Thanks Nicolas, worked a treat.
Simba Greetings from germany! :) Can you told me your EXIT-strategy for this, please? :) Would ...

Top