This indicator is about Dow’s theory, it detects the highs and lows of a trend to clearly identify trends or periods when the market is in range.
It has major points (based on a long-term calculation) and minor points (calculated on a short term). These periods are of course adjustable, it also includes a moving average of type and adjustable period to match your style of ‘swing trader’.
Converted from an MQL4 code, by a request in the Italian trading indicator’s forum.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
//PRC_LastManStandingIndicator | indicator //14.11.2017 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //translated from MQL4 code // --- settings //PeriodsInMajorSwing=13 //PeriodsInMinorSwing=5 //MovingAverageMethod=1 //MovingAveragePeriods= 55 // --- end of settings EMA = average[MovingAveragePeriods,MovingAverageMethod](close) hhminorprice=0 llminorprice=close*1000 for i = 1 to PeriodsInMinorSwing*2 do if high[i]>hhminorprice then hhminorbar = barindex[i] hhminorprice = high[i] endif if low[i]<llminorprice then llminorbar=barindex[i] llminorprice=low[i] endif next hhmajorprice=0 llmajorprice=close*1000 for i = 1 to PeriodsInMajorSwing*2 do if high[i]>hhmajorprice then hhmajorbar = barindex[i] hhmajorprice = high[i] endif if low[i]<llmajorprice then llmajorbar=barindex[i] llmajorprice=low[i] endif next atr=averagetruerange[14] if barindex-hhminorbar=PeriodsInMinorSwing then drawtext("●",hhminorbar,hhminorprice,Dialog,Bold,10) coloured(100,149,237) endif if barindex-llminorbar=PeriodsInMinorSwing then drawtext("●",llminorbar,llminorprice,Dialog,Bold,10) coloured(100,149,237) endif if barindex-hhmajorbar=PeriodsInMajorSwing then drawtext("●",hhmajorbar,hhmajorprice+atr/2,Dialog,Bold,20) coloured(128,0,128) endif if barindex-llmajorbar=PeriodsInMajorSwing then drawtext("●",llmajorbar,llmajorprice-atr/2,Dialog,Bold,20) coloured(128,0,128) endif return EMA coloured(184,134,11) as "EMA" |
Share this
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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Merci Nicolas, voila encore un bon indicateur visuel pour les tendances…
Un Indicateur bien pratique à intégré dans sa stratégie, Thanks ! 🙂
Thanks Nicolas
Nice Job
Hi Nicolas,
this indicator is repainting, is it?
There’s no repainting indicator in prorealtime. But this one plots the points afterwards of course. There’s always a delay to be sure a higher high is really one!
Attention, regardez bien la construction du code !!!
Les points bleu s’affichent entre barindex-1 & barindex-10
Les points violet s’affichent entre barindex-1 & barindex-26
Donc décalage…
Un outil très visuel et utile
Merci
Hi Nicolas
How could I use the indicator in a strategy ? Coding do not recognize the indicator.
Tku
JC
What do you want to do exactly? Because dots are plotted afterwards..
I want to place buy or sell order just after the last man , what is the code to use ? i tried to place buy or sell instead of drawtext it is not working
But it should, please open a new specific topic in the ProOrder automatic trading forum.
Bonjour
Quel est le retard d’affichage des points mineurs et majeurs ?
Merci de votre rep Cordialement
Désolé, je ne comprends pas la question 🙂
Très intéressant, merci !
Please help the above is not working for me
what is not working please? attach the indicator on your price chart and it should work correctly.
Do the dots appear on the candle close or after a certain amount of candles?
Yes that’s right, they are painted backwards.
Bonjour Nicolas,
Je ne comprends pas bien la fonction des 2 lignes ci-dessous, pourriez-vous m’expliquer brièvement ?
hhminorprice=0
llminorprice=close*1000
Pourquoi ne pas partir avec les valeurs des premières chandelles ?
Merci.
Oui pourquoi pas? 🙂
Bonjour Nicolas,
merci encore pour ce super indicateur. se demander s’il est possible d’écrire un screener basé sur cet indicateur.
merci beaucoup.
Screener déjà présent sur le forum ici: https://www.prorealcode.com/topic/indicador-lastmanstanding-swing/