Indicatore stagionalità
Forums › ProRealTime forum Italiano › Supporto ProBuilder › Indicatore stagionalità
- This topic has 20 replies, 5 voices, and was last updated 6 years ago by Nicolas.
Tagged: seasonality
-
-
04/16/2018 at 10:26 PM #68538
mmmh credo sia più una cosa così, ovviamente non so come programmarla variabili: barrefuture,history1,history2,history3,prezzo tf possibile: giornaliero,4h,1h barrefuture = 100 // possibilità di cambiare il valore history1 = 1 // possibilità di cambiare il valore history2 = 2 // possibilità di cambiare il valore history 3= 3 // possibilità di cambiare il valore if history1 = 0 then “non disegnare nulla” else if media degli ultimi x anni // mediamobile da aggiungere poi e applicarla alla history1 if history2 = 0 then “non disegnare nulla” else if media degli ultimi x anni // mediamobile da aggiungere poi e applicarla alla history2 if history3 = 0 then “non disegnare nulla” else if media degli ultimi x anni // mediamobile da aggiungere poi e applicarla alla history3 prezzo = linea con le chiusure del prezzo
05/01/2018 at 10:45 AM #6955305/24/2018 at 6:08 PM #7128705/31/2018 at 2:14 PM #71861ho trovato questo non so se è utile:
1234567891011121314151617181920study("5 Period Cycle Seasonality")Period = input(title="Period Cycle", type=integer , defval=252)LastYear = close[Period]TwoYearsAgo = close [2 * Period]ThreeYearsAgo = close [3 * Period]FourYearsAgo = close [4 *Period]FiveYearsAgo = close [5 * Period]Offset = PeriodLastYearE = close[Period - Offset]TwoYearsAgoE = close [2 * Period - Offset]ThreeYearsAgoE = close [3 * Period - Offset]FourYearsAgoE = close [4 *Period - Offset]FiveYearsAgoE = close [5 * Period - Offset]plot((LastYearE + TwoYearsAgoE + ThreeYearsAgoE + FourYearsAgoE + FiveYearsAgoE) / 5, color = #00ff00, linewidth = 5, offset = Offset)plot((LastYear + TwoYearsAgo + ThreeYearsAgo + FourYearsAgo + FiveYearsAgo) / 5, color = #ff0000, linewidth = 5)1234567891011121314151617181920study("5 Period Cycle Seasonality - %")Period = input(title="Period Cycle", type=integer , defval=252)LastYear = (close[Period]-close[2 * Period])/close[2 * Period]TwoYearsAgo = (close [2 * Period]-close[3 * Period])/close[3 * Period]ThreeYearsAgo = (close [3 * Period]-close[4 * Period])/close[4 * Period]FourYearsAgo = (close [4 *Period]-close[5 * Period])/close[5 * Period]FiveYearsAgo = (close [5 * Period]-close[6 * Period])/close[6 * Period]Offset = PeriodLastYearE = (close[Period - Offset]-close [2 * Period - Offset])/close [2 * Period - Offset]TwoYearsAgoE = (close [2 * Period - Offset]-close [3 * Period - Offset])/close [3 * Period - Offset]ThreeYearsAgoE = (close [3 * Period - Offset]-close [4 * Period - Offset])/close [4 * Period - Offset]FourYearsAgoE = (close [4 *Period - Offset]-close [5 * Period - Offset])/close [5 * Period - Offset]FiveYearsAgoE = (close [5 * Period - Offset]-close [6 * Period - Offset])/close [6 * Period - Offset]plot((LastYearE + TwoYearsAgoE + ThreeYearsAgoE + FourYearsAgoE + FiveYearsAgoE) / 5, color = #00ff00, linewidth = 2, offset = Offset)plot((LastYear + TwoYearsAgo + ThreeYearsAgo + FourYearsAgo + FiveYearsAgo) / 5, color = #ff0000, linewidth = 2)hline(0)05/31/2018 at 3:06 PM #71869Non è in linguaggio PRT, forse MT4?
Nocolas potrebbe sapere se può tradurlo.
10/08/2018 at 9:34 AM #82248Il codice sotto è la conversione dal codice di tradingview (versione in percentuale).
123456789101112131415161718192021Period = 252LastYear = (close[Period]-close[2 * Period])/close[2 * Period]TwoYearsAgo = (close [2 * Period]-close[3 * Period])/close[3 * Period]ThreeYearsAgo = (close [3 * Period]-close[4 * Period])/close[4 * Period]FourYearsAgo = (close [4 *Period]-close[5 * Period])/close[5 * Period]FiveYearsAgo = (close [5 * Period]-close[6 * Period])/close[6 * Period]result = (LastYear + TwoYearsAgo + ThreeYearsAgo + FourYearsAgo + FiveYearsAgo) / 5Offset = PeriodLastYearE = (close[Period - Offset]-close [2 * Period - Offset])/close [2 * Period - Offset]TwoYearsAgoE = (close [2 * Period - Offset]-close [3 * Period - Offset])/close [3 * Period - Offset]ThreeYearsAgoE = (close [3 * Period - Offset]-close [4 * Period - Offset])/close [4 * Period - Offset]FourYearsAgoE = (close [4 *Period - Offset]-close [5 * Period - Offset])/close [5 * Period - Offset]FiveYearsAgoE = (close [5 * Period - Offset]-close [6 * Period - Offset])/close [6 * Period - Offset]//drawvline(barindex[period])offsetresult = (LastYearE + TwoYearsAgoE + ThreeYearsAgoE + FourYearsAgoE + FiveYearsAgoE) / 5return result, offsetresult coloured(255,0,0) -
AuthorPosts
Find exclusive trading pro-tools on