Nicolas

ASCTrend

Category: Indicators By: Nicolas Created: January 13, 2021, 1:40 PM
January 13, 2021, 1:40 PM
Indicators
35 Comments
ASCTrend

ASCTrend indicator uses WPR (Williams Percent Ratio) indicator in order to give trading signals on the price chart.

The “RISK” variable setting is used to define the WPR period this way: period = 3+RISK*2

Buy and sell levels are settled using the RSI variable also:

_ buy level > – (33 – RISK)

_ sell level < – (67 + RISK)

The trading signals are filtered to avoid the same signal repetition and price peaks or gaps.

You can modify the “CountBars” setting in order to plot more or historical signals on the price chart.

Compatible version with PRT v10.3 (or any v11 prior version) is attached to the post.

Indicator converted following a request in the trading indicators forum: https://www.prorealcode.com/topic/conversion-indicateur-mt4-asct-rend_sound-mq4/

//PRC_ASCTrend | indicator
//13.01.2021
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted from MT4 version

// --- settings 
RISK=3
CountBars=300
// --- end of settings 

value10=3+RISK*2
x1=67+RISK
x2=33-RISK
value11=value10

shift=CountBars-11-1

if islastbarupdate and barindex>CountBars then 
while(shift>=0) do 

Counter=shift
iRange=0.0
AvgRange=0.0
for Counter=shift to shift+9 do 
AvgRange=AvgRange+Abs(High[Counter]-Low[Counter])
next

iRange=AvgRange/10
Counter=shift
TrueCount=0
while (Counter<shift+9 and TrueCount<1) do 
if (Abs(Open[Counter]-Close[Counter+1])>=iRange*2.0) then 
TrueCount=TrueCount+1
endif
Counter=Counter+1
wend
if (TrueCount>=1) then 
MRO1=Counter
else 
MRO1=-1
endif 

Counter=shift
TrueCount=0
while (Counter<shift+6 and TrueCount<1) do 
if (Abs(Close[Counter+3]-Close[Counter])>=iRange*4.6) then 
TrueCount=TrueCount+1
endif
Counter=Counter+1
wend
if (TrueCount>=1) then 
MRO2=Counter
else
MRO2=-1
endif


if (MRO1>-1) then 
value11=3
else 
value11=value10
endif
if (MRO2>-1) then 
value11=4
else 
value11=value10
endif 

value2=100-Abs(Williams[value11](close)[shift]) // PercentR(value11=9)
$Tablevalue2[shift]=value2
$val1[shift]=0
$val2[shift]=0
value3=0

if (value2<x2) then 
i1=1
while ($Tablevalue2[shift+i1]>=x2 and $Tablevalue2[shift+i1]<=x1) do 
i1=i1+1
wend
if ($Tablevalue2[shift+i1]>x1) then 
value3=High[shift]+iRange*0.5
if (shift = 1 and flagval1=0) then
flagval1=1
flagval2=0
endif
$val1[shift]=value3
drawarrowdown(barindex[shift],$val1[shift]) coloured(255,0,255)
endif
endif

if (value2>x1) then 
i1=1
while ($Tablevalue2[shift+i1]>=x2 and $Tablevalue2[shift+i1]<=x1) do 
i1=i1+1
wend
if ($Tablevalue2[shift+i1]<x2) then 
value3=Low[shift]-iRange*0.5
if (shift = 1 and flagval2=0) then 
flagval2=1
flagval1=0
endif
$val2[shift]=value3
drawarrowup(barindex[shift],$val2[shift]) coloured(0,255,255)
endif
endif


shift=shift-1
wend
endif 
return

Download
Filename: PRC_asctrend_v10.3.itf
Downloads: 413
Download
Filename: PRC_ASCTrend.itf
Downloads: 1560
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Abouadam2
5 years ago
#

EFFICACE

venugopal
5 years ago
#

Hi Nicolas, Thanks for this code. Is it possible to build a screener using this indicator?. I have raised the request here, could you please help. https://www.prorealcode.com/topic/help-to-convert-prctrend-indicator-to-screener/

Nicolas
5 years ago
#

It has been done in that topic. Enjoy.

dudley10wise
5 years ago
#

I tried loading it but it gives me an error on line 71 is there a fix, tried both downloads and same result.

Marius Zammit
5 years ago
#

i tried to download this and set up but it didnt seem to work on my chart.

JOKAMAURICE
5 years ago
#

Bizarre, j'ai importé l'indicateur et je n'ai aucun signal. PRT 11.1

Zoul68
5 years ago
#

Bonjour, Merci pour votre indicateur, il est très performant ! Si je ne me trompe pas : la détection de GAP (ligne 30 à 42) positionne la variable MRO1, qui en ligne 59 positionne la variable valeur11 pour le calcul du Williams, mais le test de mro2 en ligne 64 écrase alors la variable valeur11 (la valeur 3 pour le GAP est perdue) Merci pour votre travail

Niconott
5 years ago
#

Merci Nicolas, Au plaisir,

Niconott
5 years ago
#

Bonsoir Nicolas, Je souhaiterai pouvoir être alerté, par mail, lorsque l'indicateur "achat" (flèche bleu) s'applique sur un titre et ce sur une plage horaire définie (ex : de 21hà 22h) L'idéal serait que ces alertes puissent concerner l'ensemble des titres d'une liste et non les titres dont le graphique est ouvert. Pensez vous que cela puisse être possible svp ? Au plaisir de vous lire, Nicolas :)

Nicolas
5 years ago
#

Les alertes emails ne sont pas possibles avec des indicateurs personnalisés, désolé !

Stenozar
5 years ago
#

Hi Nicolas, I put the 10.3 version but it gives me a syntax error; can you help me please?

Guibourse
5 years ago
#

Bonjour Nicolas, en dépit de mes efforts, je ne parviens pas à trouver comment ajouter une condition à l'apparition des flèches par rapport à un autre indicateur, dans ce code particulier. Par exemple : afficher les flèches qui montent uniquement si le close est supérieur à une moyenne mobile et inversement. Merci beaucoup pour votre aide.

Nicolas
5 years ago
#

c'est en effet plutôt complexe dans cette version du code qui trace dans le passé depuis la barre courante, plutôt qu'en lisant l'historique au chargement, je te conseil de créer un sujet pour cette demande particulière. Merci de respecter les règles de publication.

JohnK
5 years ago
#

Hi there, I am sorry, but I can not get the Indicator on the price chart, it keeps opening in a seperate window and shows nothing. I imported the indicator then added to chart, were did I go wrong? Thanks for responding. Cheers, KnightJohn

Nicolas
5 years ago
#

Add it on the price chart by using the wrench at the left upperside of the price chart.

david4600
5 years ago
#

bonjour nicolas . merci pour votre indicateur ..je viens de le telecharger ...

marinober
6 years ago
#

Buonasera Nic. Non è possibile farlo funzionare sulla versione 10.3 ? la 11 è bella ma molto pesante, Grazie per la cortese risposta

Nicolas
6 years ago
#

I just added v10.3 for ASCTREND in the above post. Download the compatible version from there.

macdopa
6 years ago
#

Bonjour Nicolas. Je me rends compte que nous pouvons discuter avec vous en français pour mieux comprendre notre algo-stratégie de trading automatique. Merci

Nayer
6 years ago
#

Bonjour Nicolas, Merci beaucoup pour ce super algo, il est très efficace! J'essaie de le convertir en script de trading automatique, du coup j'ai décommenté vos lignes: RISK=3 CountBars=300 j'ai remplacé la ligne 88 : drawarrowdown(barindex[shift],$val1[shift]) coloured(255,0,255) par SELLSHORT N SHARE AT MARKET et la ligne 104: drawarrowup(barindex[shift],$val2[shift]) coloured(0,255,255) par BUY N SHARE AT MARKET Néanmoins, quand le script essaie de se lancer, j'obtiens le message d'erreur: le système de trading a été arrêté car le code tente de définir ou d'appeler un index qui dépasse la limitation de 1000000 dans un tableau. Nous avons besoin de votre aide là dessus svp ? :)

Nicolas
6 years ago
#

voir le lien plus haut dans les commentaires sur un sujet du forum qui comporte le code de la stratégie.

macdopa
6 years ago
#

Bonjour Nicolas. Il y a-il moyen de nous aider à développer ou programmer une algo-stratégie pour des trading automatique ? Merci d'avance pour travailler sur cette stratégie révolutionnnaire dénommée : "grignotage à la souris au saut de kangourou".

ArnoOosterhof
6 years ago
#

Is it possible to backtest this in prorealtime? If yes, how can I code this. Great signals btw, thanks in advance.

Nicolas
6 years ago
#

Strategy code can be downloaded there: https://www.prorealcode.com/topic/strategie-avec-indicateur-asctrand/

Bossebus
6 years ago
#

Can't get this indicator to work. If anyone else experince the same "problem" and found the solution. Please give me a helping hand! :)

Bossebus
6 years ago
#

It worked! Added it to a chart under before, thats why. Thanks for help and indicator! :)

Nicolas
6 years ago
#

Add it on your price chart and it should work!

Daveangelaust
6 years ago
#

Merci, Nicolas. Can this be set up as an Autotrade to order go long on the buy signal and then close on the sell signal and then vice versa? Thank you

Nicolas
6 years ago
#

Yes sure.

ProRealCode ProRealCode
Loading...