Buy Sell Magical Trend

Buy Sell Magical Trend

The Buy Sell Magical Trend indicator is a “trailing stop” style indicator made of trend inversion obtained with Bollinger Bands. SignalPeriod is the period of the Bollinger bands and ArrowPeriod the standard deviation applied to it.
The arrows are painted on the breakthrough of the other side band with segments connecting the 2 most recent arrows.

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. FXtonio • 04/17/2023 #

    Bonjour Nicolas, génial cet indicateur, plutôt précis (67% de trades gagnants) merci 🙂

    • Nicolas • 04/17/2023 #

      C’est “magical” ! Bonne continuation 🙂

    • RICOU • 04/17/2023 #

      Bonjour, quelle est la meilleure UT pour travailler avec cet indicateur?

    • FXtonio • 04/17/2023 #

      @RICOU en 1 minutes avec un filtre de tendance ZLSMA 200 et eventuellement un rsi 7 , 69% de trade gagnant rr 1.5

  2. superfalcio • 04/17/2023 #

    Hello Nicolas, just started having a look on this last indicator : what timeframe this default parameters are working better? and as forex than indeces? thank you 🙂

    • Nicolas • 04/17/2023 #

      I don’t know, this is your part 🙂

  3. gioport • 04/17/2023 #

    Bonjour Nicolas…..
    est-il possible de construire un écran …. merci

    • Nicolas • 04/17/2023 #

      Merci d’ouvrir un sujet sur le forum avec une description complète du screener.

  4. RICOU • 04/17/2023 #

    Bonjour Nicolas, est il possible d’avoir un codage complet d’un trade automatique avec les paramètres de cet indicateur ?

    • Nicolas • 04/17/2023 #

      Oui, merci d’ouvrir un sujet dans le forum ProOrder pour créer une stratégie avec cet indicateur.

  5. Chrisinobi • 04/17/2023 #

    Hallo Nicolas eine Tolle Arbeit, wie immer !!!! Eine Frage zu Deinem Indikator, könntest du es so bauen, das man ein Signal auf die Pfeile setzen kann ???? Danke

    • Nicolas • 04/17/2023 #

      Ändern Sie die letzte Zeile des Codes mit:
      return ts coloured(r,g,0) style(dottedline,2), trend as “trend direction”
      um den Trend zu erhalten (1=grün, -1=rot)

  6. Chrisinobi • 04/17/2023 #

    Danke Nicolas, vielleicht habe ich mich verkehrt ausgedrückt, ich will gerne einen Alarm auf dem Pfeil haben um damit Automatisch einen Trade zu beginnen. Wenn das so möglich wäre ??? Nicht als Algo einfach nur in der Alarmeinstellung, um nicht ständig den Bildschirm zu beobachten müssen. Vielen Dank

    • Nicolas • 04/17/2023 #

      das ist richtig, man kann die Warnungen nicht codieren, also muss man das integrierte Tool der Plattform verwenden.

  7. Chrisinobi • 04/17/2023 #

    Ich Denke, ich habe es begriffen, in den Alarmeinstellung einfach, kreuzt über Wert 1, als Buy und kreuzt unter Wert -1, als Sell. Nochmals Danke

  8. aldtrading • 04/17/2023 #

    Merci pour votre travail.

  9. JC_Bywan • 04/17/2023 #

    For people interested in the screener: https://www.prorealcode.com/topic/screener-buy-sell-magic-indicator/#post-214201
    For people interested in a strategy: https://www.prorealcode.com/topic/buy-sell-magical-trend/

  10. octum • 04/17/2023 #

    Gracias NJicolas. Las lineas 35 y 36 dan fallo. (¿Es adrede para iniciados?)
    Puedes corregir porfa? Gracias.

  11. mortezaali14 • 171 days ago #

    Salut Nicholas, comment exécuter ce fichier dans les métadonnées

  12. Leduc71 • 8 days ago #

    Bravo ! Cet indicateur est un suiveur de tendance, type “stop and reverse”, inspiré des canaux de volatilité.
    Il fonctionne bien en tendance mais peut donner de faux signaux en range.
    C’est un outil robuste, populaire, à condition de bien régler les paramètres selon l’actif et la période.

    Points forts :
    Clarté : L’indicateur donne des signaux nets, faciles à lire sur le graphique.
    Suit les tendances : Il permet de “coller” à la tendance du marché, en sortant lors des retournements majeurs.
    Approche “stop and reverse” : Toujours en position (long ou short), pas de période à l’écart du marché.
    Approche éprouvée : La logique est proche de SuperTrend ou Donchian Channel, connus pour leur robustesse.

    Limites / Points de vigilance :
    Beaucoup de faux signaux en marché range : Comme tout indicateur de tendance, il peut donner des entrées/sorties inutiles sur un marché plat ou sans volatilité.
    Réactivité dépend des paramètres : Si SignalPeriod ou ArrowPeriod sont trop faibles, on aura trop de signaux ; trop élevés, tu risques de rater le début des mouvements.
    Pas de filtre de volatilité : Il n’intègre pas d’ATR ou de filtre pour ignorer les “bruits” de marché.

    Version améliorée avec filtres ATR et volume : les signaux d’achat/vente ne sont générés que lorsque la volatilité (ATR) et le volume dépassent des seuils définis, afin de limiter les faux signaux et ne prendre position que sur les phases actives du marché (on peut régler l’ATR et Volume au besoin)

    // PRC_BuySell Magic02 – Version filtrée ATR et Volume pour UT 1mn

    SignalPeriod = 12
    ArrowPeriod = 2
    ATRperiod = 14
    StartHour = 8
    EndHour = 18

    bbup = average[SignalPeriod] + std[SignalPeriod] * ArrowPeriod
    bbdn = average[SignalPeriod] – std[SignalPeriod] * ArrowPeriod

    myATR = average[ATRperiod](tr)

    // Initialisation
    if barindex = 0 then
    ts = 0
    trend = 0
    startbar = 0
    startts = 0
    endif

    // Entrée initiale avec filtres
    if ts = 0 and myATR > 0.60 and volume > 100 and (hour >= StartHour and hour 0.60 and volume > 100 and (hour >= StartHour and hour 0.60 and volume > 100 and (hour >= StartHour and hour <= EndHour) then
    trend = 1
    ts = bbdn
    r = 0
    g = 255
    drawarrowup(barindex, ts) coloured("lime")
    drawsegment(startbar, startts, barindex, ts) style(dottedline2) coloured("blue")
    startbar = barindex
    startts = ts
    endif

    return ts coloured(r, g, 0) style(dottedline, 2)

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+21 more likes

Related users ' posts
Stockastiss Can this code be simply transferred into Backtestingcode so one doesnt need to use call ? (i...
Vonasi Sorry for the late reply. Add the code to your strategy and remove line 5 and line 39. Chang...
viktorthunss Hi! How many averages are there? Can I see the somewhere?
Zigo Normaly it do work in version 11.
bertrandpinoy Hello to all, please does a coder can bring the indication of the price level on the chart o...
Zigo @bertrandpinoy add between line 50 and 51 : drawtext("#dnh#",barindex,low-2.618*AverageTrue...
leofi https://www.prorealcode.com/topic/simple-average-with-visual-color/
leofi Go visit www.prorealcode.com/topic/simple-average-with-visual-color/ and watch 2em post
Dritan Hi,I am new on Prorealtime and coding.I downloaded the indi but I have it on a separate wind...
Denis Hello Nicolas, Thank you and congratulations for your work. The entry signals seem interes...
mia Bonjour j'arrive pas a integrer l'indicateur sur mt4 comment faire svp mercii
Nicolas Il ne s'agit pas d'un indicateur MT4, je vous suggère d'utiliser ProRealTime qui est une mei...
dawn168 Nicolas, I cannot get this one to work on tradingview. Got the following error message. Can ...
Nicolas There is no code for Tradingview on this website.
Moitomkw Try as soon as: hh = highest[MagicFilterPeriod](low) ll = highest[MagicFilterPeriod](high)
Franro Hi, this looks very good is this something you worked towards a strategy?
hua hin Bonjour comment mettre ce programme sur un graphique le lien est en JPG et sur crewation i...
Dron Hola! El archivo itf donde esta?
Nicolas Just add it on the price series.
yomisadiku Hello Nicolas, Can I use high and low price at lines hh=max(hh,close) and ll=min(ll,close) ...
Nicolas Yes you can do that, the impact will be that the trailing stop line will be much close to th...
Byggtrader Hi Nicolas! How do I get the indicator in the price chart? It only stays under i new chart.
Nicolas Just add it on the price chart by using the wrench on the left upper side of the chart (pric...
Dom Hello, hello....je commence le trading et découvre par la même occasion le codage....et ce n...
Nicolas Merci, ça fait plaisir !
Be-n Bonjour tout le monde ! Dans l'indicateur de tendance, j'ai du mal à saisir la nuance entre ...
Globalmarkets79 Thank you Vonasi for the answer. I have an other question. When i tried to run the indicator...
Vonasi Lines is either 0 or 1 to turn on or off the drawing of them. Once again if you download and...
Globalmarkets79 Thank you Vonasi, this indicator is very helpful!!!
Nicolas
6 years ago
Bateson Merci pour la réponse Nicolas. C'est bien ce que j'ai fait mais ça ne fonctionne toujours pa...
Enzo Paliotti Veramente ottimo, era quello che cercavo, si potrebbe modificare inserendo come variazione a...
Nicolas Perché no, chiedetelo con una descrizione dettagliata nel forum degli indicatori, per favore!
jiddan78 how to convert to afl amibroker ?
Nicolas We do not supply free coding assistance for AFL Amibroker on the website. You can ask for pa...
Ngomsi @ Vonasi, how to use timeframe , 13 minutes ,21 minutes, 34 minutes,et 55 minutes with this...
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
riz001 thnk u
geroniman bonjour Nicolas, j ai un indicateur le Tiger . J aiemrai placer des fleches buy et sell dire...
Nicolas Merci de formuler les demandes sur le forum. ça n'est pas le bon endroit et hors sujet ici ! ;)
avatar
Anonymous Hi robertogozzi - thank you very much for sharing this strategy. I have performed various ...
robertogozzi Thank you samsampop.
Dotan Hello guys I really appreciate this coding effort but can I use this code for Mt5 Forex Trad...
Bard I've also just noticed that changing the "Bands Deviation" setting from 1.25 to eg 3 doesn't...
bartekz Hi @Nicolas, Really impressed by your work. I am trying to replicate the Wave-PM indicator t...
Nicolas You don't have to replicate it, download the file and import it into your platform.
LucioleLucide Clean view, thanks for sharing
dertopen hi where i can found the window for candle configuration?
paolosab69 Ciao! . I have seen the pictures that explain this metod but i don't understand when is mome...
Marie-Eve Vergoz lorsque je copie les codes, le système me signale des erreurs à la ligne 12 et suivantes
Marie-Eve Vergoz sorry - tout est ok -
jobswaps Sube como trazar lineas de tendencias a tantas barras
Frankiesc interesting indicator !! Thanks for sharing!!!
robertogozzi Thank you :)

Top