Indicatore PerfectTrend
Forums › ProRealTime forum Italiano › Supporto ProOrder › Indicatore PerfectTrend
- This topic has 8 replies, 2 voices, and was last updated 4 years ago by robertogozzi.
Viewing 9 posts - 1 through 9 (of 9 total)
-
-
05/18/2020 at 6:35 PM #132196Perfect Trend12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061//PRC_PerfectTrendLine ptl | indicator//16.10.2017//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//converted from MT4 version (original author mladen)//enhanced version by Nicolas// --- settings//SlowLength = 7 // Slow length//SlowPipDisplace = 0 // Slow pip displace//FastLength = 3 // Fast length//FastPipDisplace = 0 // Fast pip displace// --- end of settingsthigh1 = Highest[SlowLength](high)+ SlowPipDisplace*pointsizetlow1 = Lowest[SlowLength](low)- SlowPipDisplace*pointsizethigh2 = Highest[FastLength](high)+ FastPipDisplace*pointsizetlow2 = Lowest[FastLength](low)- FastPipDisplace*pointsizeif barindex>2 thenif Close>line1[1] thenline1 = tlow1elseline1 = thigh1endifif Close>line2[1] thenline2 = tlow2elseline2 = thigh2endifendifif (Close[0]<line1[0] and Close[0]<line2[0]) thentrend = 1endifif (Close[0]>line1[0] and Close[0]>line2[0]) thentrend = -1endifif (line1[0]>line2[0] or trend[0] = 1) thentrena = 1endifif (line1[0]<line2[0] or trend[0] = -1) thentrena = -1endifif trena<>trena[1] thenif trena=1 thenx = max(line1,line2)r=200g=20b=60elsex = min(line1,line2)r=30g=144b=255endifdrawtext("●",barindex,x,Dialog,Bold,10) coloured(r,g,b)endifdrawbarchart(line1,line2,line1,line2) coloured(r,g,b,50)return line1 coloured(r,g,b,100) style(line,1),line2 coloured(r,g,b,100) style(line,1)
Salve, vorrei vendere solo quando l’indicatore segna il pallino rosso e comprare in corrispondenza del pallino blu…qualcuno mi da una mano con il codice, che mi sono un po’ annodato 🙂 Grazie mille.
05/18/2020 at 6:45 PM #132199Ecco fatto:
123456789101112131415161718192021222324252627282930313233343536373839404142DEFPARAM CumulateOrders = falseSlowLength = 7 // Slow lengthSlowPipDisplace = 0 // Slow pip displaceFastLength = 3 // Fast lengthFastPipDisplace = 0 // Fast pip displacethigh1 = Highest[SlowLength](high)+ SlowPipDisplace*pointsizetlow1 = Lowest[SlowLength](low)- SlowPipDisplace*pointsizethigh2 = Highest[FastLength](high)+ FastPipDisplace*pointsizetlow2 = Lowest[FastLength](low)- FastPipDisplace*pointsizeif barindex>2 thenif Close>line1[1] thenline1 = tlow1elseline1 = thigh1endifif Close>line2[1] thenline2 = tlow2elseline2 = thigh2endifendifif (Close[0]<line1[0] and Close[0]<line2[0]) thentrend = 1endifif (Close[0]>line1[0] and Close[0]>line2[0]) thentrend = -1endifif (line1[0]>line2[0] or trend[0] = 1) thentrena = 1endifif (line1[0]<line2[0] or trend[0] = -1) thentrena = -1endifif trena<>trena[1] AND Not OnMarket thenif trena=1 thenSELL 1 contract at marketelseBUY 1 contract at marketendifendifSet Target pProfit 100Set Stop pLoss 5005/18/2020 at 6:50 PM #13220005/18/2020 at 7:12 PM #132201Scusa, hai ragione, la riga 36 deve essere:
1SELLSHORT 1 contract at market05/18/2020 at 7:16 PM #13220205/18/2020 at 7:55 PM #132206Sarà già a mercato.
05/18/2020 at 7:59 PM #13220805/18/2020 at 8:57 PM #132211Dimmi lo strumento ed il TF su cui l’hai provato e data e ora delle candele in cui doveva entrare e mon l’ha fatto.
05/18/2020 at 9:03 PM #132214Prova anche questa strategia fatta da Nicolas https://www.prorealcode.com/topic/perfect-trend-indicator/#post-50725
-
AuthorPosts
Viewing 9 posts - 1 through 9 (of 9 total)
Find exclusive trading pro-tools on
Similar topics: