Indicateur on/of sur les HL HH LH LL du zigzag
Forums › ProRealTime forum Français › Support ProBuilder › Indicateur on/of sur les HL HH LH LL du zigzag
- This topic has 21 replies, 6 voices, and was last updated 4 years ago by Lifen.
-
-
06/18/2020 at 5:34 PM #136494
Lifen,
Voici les liens
J’ai ajouté aussi celui de Nicolas car il est très bien …
/// Nicolas ==> plus haut & plus bas ////////////// SUPER !! car je bosse principalement avec les plus H et B
screener : plus haut / plus bas
https://www.prorealcode.com/prorealtime-market-screeners/lower-lows-up-swing/
indicateur:plus haut / plus bas
https://www.prorealcode.com/topic/conversion-tradingview-to-prorealtime-higher-highs-and-lower-lows//// Léo ==> double top et bottom
screener :double top et bottomhttps://www.prorealcode.com/prorealtime-market-screeners/double-top-double-bottom-screener/
indicateur :double top et bottom
https://www.prorealcode.com/prorealtime-indicators/double-top-double-bottom-detector/PS: Nicolas, n’est pas là pour te donner des stratégies, tu dois avoir les tiennes 🙂 Il nous aide simplement pour les soucis de codes lool
Un indicateur est là pour être incorporer dans une stratégie mais ne se suffit pas à lui seul.
Je te souhaite une bonne réception 🙂
06/18/2020 at 5:41 PM #136496Fifi,
C’est exactement ce que j’ai fait, mais les signaux ne correspondent pas du tout 🙁
Voir photo123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138//LOCALS MINIMUMS AND MAXIMUMS USING LEO MOVING AVERAGE//Autor: LEO//VARIABLES TO BE OPTIMIZEDPERIOD=20 //Period for analysisKdouble=0.2 //Factor for defining what is double top or bottom//-----------//signal2=0signal=0//Leo Moving Average, formula: LMA= WMA+(WMA-SMA)LMA=2*weightedaverage[period](close)-average[period](close)//Smoothed curve of Leo Moving AverageIF BARINDEX > period THENsmoothLMA=weightedaverage[period](LMA)ELSEsmoothLMA=undefinedENDIF// << Storage of minimums and maximums >>once mintemp=lowonce posmintemp=1once maxtemp=highonce posmaxtemp=1IF BARINDEX>2 THEN// the value 0.75 is to ensure that the donchian channel is faster than the curves analysis (this value to be checked)IF low < lowest[round(0.75*period)](low[1]) THENmintemp=low //minimum temporalposmintemp=BARINDEX //postition of minimum temporalsignal =1 // == fleche basENDIFIF high > highest[round(0.75*period)](high[1]) thenmaxtemp=high //maximum temporalposmaxtemp=BARINDEX //position maximum temporalsignal =-1ENDIFENDIF// << Detecting and locating a local minimums >>// Where the LMA is crossing the smoothed LMA, there is a maximum or minimum nearby// If there is a new local min/max, the preivus one is stored in de varible B... (before)once LEVMIN=lowonce POSLEVMIN=1once LEVMAX=highonce POSLEVMAX=1once bullcross=0once bearcross=0IF BARINDEX > PERIOD THEN //For avoid computer errorsbullcross=LMA crosses over smoothLMAbearcross=LMA crosses under smoothLMAENDIFIF bullcross THENBLEVMIN=LEVMIN //previus local minimum is savedBPOSLEVMIN=POSLEVMINLEVMIN=mintempPOSLEVMIN=posmintempsupport=LEVMINDRAWARROWUP(POSLEVMIN,LEVMIN) coloured(0, 48, 47, 59)IF POSLEVMIN AND LEVMIN THENsignal =1endifENDIF// --> Detecting and locating a local maximumIF bearcross THENBLEVMAX=LEVMAX //previus local maximum is savedBPOSLEVMAX=POSLEVMAXLEVMAX=maxtempPOSLEVMAX=posmaxtempresistance=LEVMAXDRAWARROWDOWN(POSLEVMAX,LEVMAX) coloured(0,0,99,100)IF POSLEVMAX AND LEVMAX THENsignal =-0.5endifENDIFsupport=min(low,support)resistance=max(high,resistance)// << DETECTING DOUBLE TOP OR BOTTOMS >>once WidthDoubleTop = high-lowonce WidthDoubleBottom = high-low//--> Double bottoms//looking for the top between two local minimumsIF bullcross THENdoublebottomtop=high[BARINDEX-POSLEVMIN+1] // we start looking for the top in between two local minimumsPOSdoublebottomtop=BARINDEX-POSLEVMIN+1FOR i = (BARINDEX-POSLEVMIN+1) to (BARINDEX-BPOSLEVMIN-1) DOIF high[i] > doublebottomtop THENdoublebottomtop=high[i]POSdoublebottomtop=BARINDEX-iENDIFNEXTWidthDoubleBottom = doublebottomtop-(BLEVMIN+LEVMIN)/2 // (top betwen local minimums) - (average of the las two local minimums)IF abs(BLEVMIN-LEVMIN) < Kdouble*WidthDoubleBottom THEN// <<<<<<< HERE WE HAVE A DOUBLE BOTTOM FOR TRADING >>>>>DRAWTRIANGLE(POSLEVMIN,LEVMIN,POSdoublebottomtop,doublebottomtop,BPOSLEVMIN,BLEVMIN) COLOURED(0,255,0,200)ENDIFENDIF//--> Double tops//looking for the bottom between two local maximumsIF bearcross THENdoubletopbottom=low[BARINDEX-POSLEVMAX+1]POSdoubletopbottom=BARINDEX-POSLEVMAX+1FOR i = (BARINDEX-POSLEVMAX+1) to (BARINDEX-BPOSLEVMAX-1) DOIF low[i] < doubletopbottom THENdoubletopbottom=low[i]POSdoubletopbottom=BARINDEX-iENDIFNEXTWidthDoubleTop=(BLEVMAX+LEVMAX)/2 -doubletopbottomIF abs(BLEVMAX-LEVMAX) < Kdouble*WidthDoubleTop THEN// <<<<<<< HERE WE HAVE A DOUBLE TOP FOR TRADING >>>>>DRAWTRIANGLE(POSdoubletopbottom,doubletopbottom,POSLEVMAX,LEVMAX,BPOSLEVMAX,BLEVMAX) COLOURED(255,0,0,200)ENDIFENDIFRETURN signal //,LMA AS "Leo Moving Average", support as "support", resistance as "resistance", smoothLMA as "smooth LMA" //, lowest[round(0.75*period)](low[1]), highest[round(0.75*period)](high[1])06/18/2020 at 5:53 PM #13649806/18/2020 at 6:01 PM #13650006/18/2020 at 6:03 PM #13650206/18/2020 at 6:14 PM #136504Ok merci Fifi 🙂
Et courage à toi Lifen :-). Je débute aussi dans la programmation 🙂 C’est agréable de constater qu’il y a aussi des nanas 🙂
Pense à faire un tour dans la rubrique “Formation”.C’est très bien quand on débute.
Très belle soirée à vous 🙂
06/18/2020 at 6:40 PM #136506 -
AuthorPosts
Find exclusive trading pro-tools on