T3 velocity
Forums › ProRealTime forum Italiano › Supporto ProBuilder › T3 velocity
- This topic has 18 replies, 2 voices, and was last updated 7 years ago by tatankayotanka.
-
-
01/10/2017 at 11:44 PM #20625
Qualcuno mi può aiutare.
Ho provato a cambiare l’ indicatore T3 velocity (creato da Nicolas) per mettere nella stessa tabella T3
con diversi periodi ma visto che il risultato non è lo stesso come il singolo
ha un percorso diverso da ‘originale vedi qui sotto (vedi foto),
potreste dirmi dove sbaglio. E anche volevo chiedere come posso fare per colorare in modo diverso
i tre indicatori . Grazie e buona giornata01/10/2017 at 11:45 PM #20628//Tracy
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172period<span class="token operator">=</span><span class="token number">2</span>vfactor<span class="token operator">=</span><span class="token punctuation">.</span><span class="token number">7</span>Data<span class="token operator">=</span>customclosex1<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor<span class="token punctuation">)</span>x2<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactorgd<span class="token operator">=</span>x1<span class="token operator">-</span>x2x11<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>gd<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor<span class="token punctuation">)</span>x21<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>gd<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactorgd1<span class="token operator">=</span>x11<span class="token operator">-</span>x21x12<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>gd1<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor<span class="token punctuation">)</span>x22<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>gd1<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactorfirst<span class="token operator">=</span>x12<span class="token operator">-</span>x22y1<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor<span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">)</span>y2<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor<span class="token operator">/</span><span class="token number">2</span>ygd<span class="token operator">=</span>y1<span class="token operator">-</span>y2y11<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor<span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">)</span>y21<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor<span class="token operator">/</span><span class="token number">2</span>ygd1<span class="token operator">=</span>y11<span class="token operator">-</span>y21y12<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd1<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor<span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">)</span>y22<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd1<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor<span class="token operator">/</span><span class="token number">2</span>second<span class="token operator">=</span>y12<span class="token operator">-</span>y22S <span class="token operator">=</span> first <span class="token operator">-</span> second<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token comment" spellcheck="true">//T+2</span>period1<span class="token operator">=</span><span class="token number">4</span>vfactor1<span class="token operator">=</span><span class="token number">0.7</span>x10<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor1<span class="token punctuation">)</span>x20<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor1gd2<span class="token operator">=</span>x10<span class="token operator">-</span>x20x110<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>gd2<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor1<span class="token punctuation">)</span>x210<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>gd2<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor1gd20<span class="token operator">=</span>x110<span class="token operator">-</span>x210x120<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>gd20<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor1<span class="token punctuation">)</span>x220<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>gd20<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor1first<span class="token operator">=</span>x120<span class="token operator">-</span>x220y10<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor1<span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">)</span>y20<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor1<span class="token operator">/</span><span class="token number">2</span>ygd2<span class="token operator">=</span>y10<span class="token operator">-</span>y20y110<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd2<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor1<span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">)</span>y210<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd2<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor1<span class="token operator">/</span><span class="token number">2</span>ygd20<span class="token operator">=</span>y110<span class="token operator">-</span>y210y120<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd20<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor1<span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">)</span>y220<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period1<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd20<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor1<span class="token operator">/</span><span class="token number">2</span>second<span class="token operator">=</span>y120<span class="token operator">-</span>y220S1 <span class="token operator">=</span> first <span class="token operator">-</span> second<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token comment" spellcheck="true">//T+3</span>period2<span class="token operator">=</span><span class="token number">30</span>vfactor2<span class="token operator">=</span><span class="token punctuation">.</span><span class="token number">7</span>x100<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor2<span class="token punctuation">)</span>x200<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor2gd<span class="token operator">=</span>x100<span class="token operator">-</span>x200x1100<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>gd<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor2<span class="token punctuation">)</span>x2100<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period<span class="token punctuation">]</span><span class="token punctuation">(</span>gd<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor2gd1<span class="token operator">=</span>x1100<span class="token operator">-</span>x2100x1200<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>gd1<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor2<span class="token punctuation">)</span>x2200<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>gd1<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor2first<span class="token operator">=</span>x1200<span class="token operator">-</span>x2200y100<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor2<span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">)</span>y200<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>Data<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor2<span class="token operator">/</span><span class="token number">2</span>ygd<span class="token operator">=</span>y100<span class="token operator">-</span>y200y1100<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor2<span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">)</span>y2100<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor2<span class="token operator">/</span><span class="token number">2</span>ygd1<span class="token operator">=</span>y1100<span class="token operator">-</span>y2100y1200<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd1<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token punctuation">(</span><span class="token number">1</span><span class="token operator">+</span>vfactor2<span class="token operator">/</span><span class="token number">2</span><span class="token punctuation">)</span>y2200<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token indicators">exponentialaverage</span><span class="token punctuation">[</span>period2<span class="token punctuation">]</span><span class="token punctuation">(</span>ygd1<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">*</span>vfactor2<span class="token operator">/</span><span class="token number">2</span>second<span class="token operator">=</span>y1200<span class="token operator">-</span>y2200S2 <span class="token operator">=</span> first <span class="token operator">-</span> second<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token indicators">DRAWTEXT</span> <span class="token punctuation">(</span><span class="token string">"Tracy"</span><span class="token punctuation">,</span> x1<span class="token punctuation">,</span> y1<span class="token punctuation">)</span> <span class="token keyword">COLOURED</span> <span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">255</span><span class="token punctuation">)</span><span class="token keyword">return</span> S2 <span class="token keyword">coloured</span> <span class="token punctuation">(</span><span class="token number">256</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">,</span> S <span class="token keyword">as</span> <span class="token string">"Tracy"</span><span class="token punctuation">,</span> <span class="token number">0</span> <span class="token keyword">as</span> <span class="token string">"level 0"</span> <span class="token punctuation">,</span>S1 <span class="token keyword">as</span> <span class="token string">"T+2"</span><span class="token punctuation">,</span> <span class="token number">0</span> <span class="token keyword">as</span> <span class="token string">"level 0"</span> <span class="token punctuation">,</span> S2 <span class="token keyword">as</span> <span class="token string">"T+3 "</span><span class="token punctuation">,</span> <span class="token number">0</span> <span class="token keyword">as</span> <span class="token string">"level 0"</span>01/11/2017 at 10:05 AM #20667Una rapida lettura del vostro codice e vedo che si sta utilizzando 2 volte (o forse più?) Lo stesso nome di variabile “gd” per 2 curve differenti (per il primo e il terzo, cosi è troppo). Il tuo problema può sicuramente venire da lì 🙂
E ‘una bella idea per compilare 3 curve differenti in un singolo oscillatore, si potrebbe aggiungere questo commento anche nella library relativa a questo indicatore, prima bisogna epurarlo dei Bug!
Grazie01/11/2017 at 10:51 PM #20794Opsss mi era sfuggito l’errore sulla variabile, grazie
01/11/2017 at 11:06 PM #20798Ecco ora l’ho sistemato ora volevo dare tre colori diversi alla varie curve , ed aggiungere una scritta nell ‘indicatore come ho scritto alla fine del programma , ma non funziona , dove sbaglio ? Poi una volta sistemato lo pubblico in Library
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172//Tracyperiod=2vfactor=.7Data=customclosex1=(exponentialaverage[period](Data))*(1+vfactor)x2=(exponentialaverage[period](exponentialaverage[period](Data)))*vfactorgd=x1-x2x11=(exponentialaverage[period](gd))*(1+vfactor)x21=(exponentialaverage[period](exponentialaverage[period](gd)))*vfactorgd1=x11-x21x12=(exponentialaverage[period](gd1))*(1+vfactor)x22=(exponentialaverage[period](exponentialaverage[period](gd1)))*vfactorfirst=x12-x22y1=(exponentialaverage[period](Data))*(1+vfactor/2)y2=(exponentialaverage[period](exponentialaverage[period](Data)))*vfactor/2ygd=y1-y2y11=(exponentialaverage[period](ygd))*(1+vfactor/2)y21=(exponentialaverage[period](exponentialaverage[period](ygd)))*vfactor/2ygd1=y11-y21y12=(exponentialaverage[period](ygd1))*(1+vfactor/2)y22=(exponentialaverage[period](exponentialaverage[period](ygd1)))*vfactor/2second=y12-y22S = first - second[1]//T+2period1=10vfactor1=0.7x10=(exponentialaverage[period1](Data))*(1+vfactor1)x20=(exponentialaverage[period1](exponentialaverage[period1](Data)))*vfactor1gd2=x10-x20x110=(exponentialaverage[period1](gd2))*(1+vfactor1)x210=(exponentialaverage[period1](exponentialaverage[period1](gd2)))*vfactor1gd20=x110-x210x120=(exponentialaverage[period1](gd20))*(1+vfactor1)x220=(exponentialaverage[period1](exponentialaverage[period1](gd20)))*vfactor1first=x120-x220y10=(exponentialaverage[period1](Data))*(1+vfactor1/2)y20=(exponentialaverage[period1](exponentialaverage[period1](Data)))*vfactor1/2ygd2=y10-y20y110=(exponentialaverage[period1](ygd2))*(1+vfactor1/2)y210=(exponentialaverage[period1](exponentialaverage[period1](ygd2)))*vfactor1/2ygd20=y110-y210y120=(exponentialaverage[period1](ygd20))*(1+vfactor1/2)y220=(exponentialaverage[period1](exponentialaverage[period1](ygd20)))*vfactor1/2second=y120-y220S1 = first - second[1]//T+3period2=30vfactor2=.7x100=(exponentialaverage[period2](Data))*(1+vfactor2)x200=(exponentialaverage[period2](exponentialaverage[period2](Data)))*vfactor2gd3=x100-x200x1100=(exponentialaverage[period2](gd3))*(1+vfactor2)x2100=(exponentialaverage[period2](exponentialaverage[period](gd3)))*vfactor2gd30=x1100-x2100x1200=(exponentialaverage[period2](gd30))*(1+vfactor2)x2200=(exponentialaverage[period2](exponentialaverage[period2](gd30)))*vfactor2first=x1200-x2200y100=(exponentialaverage[period2](Data))*(1+vfactor2/2)y200=(exponentialaverage[period2](exponentialaverage[period2](Data)))*vfactor2/2ygd3=y100-y200y1100=(exponentialaverage[period2](ygd3))*(1+vfactor2/2)y2100=(exponentialaverage[period2](exponentialaverage[period2](ygd3)))*vfactor2/2ygd30=y1100-y2100y1200=(exponentialaverage[period2](ygd30))*(1+vfactor2/2)y2200=(exponentialaverage[period2](exponentialaverage[period2](ygd30)))*vfactor2/2second=y1200-y2200S2 = first - second[1]DRAWTEXT ("Tracy", x1, y1) COLOURED (0,0, 255)return S2 coloured (256,0,0), S as "Tracy", 0 as "level 0" ,S1 as "T+2", 0 as "level 0" , S2 as "T+3 ", 0 as "level 0"01/12/2017 at 1:47 PM #20854Troverete sotto la linea di ritorno di sostituire la vostra con la sintassi corretta per colorare le tre curve. Si possono cambiare i colori come si desidera che siano ovviamente 🙂 spero di vedere questo piccolo indicatore accurato nella biblioteca ben presto, grazie in anticipo.
1return S coloured(121,20,32) as "Tracy", S2 coloured (256,0,0) as "T+3 ", S1 coloured (50,113,12) as "T+2",0 coloured(100,100,100) as "level 0"01/12/2017 at 8:19 PM #20911Un ultima domanda poi pubblico in libreria , con drawtext volevo inserire un testo dove spiega il nome della linea abbinata al colore ,ma io non ci sono riuscito.
DRAWTEXT (“Tracy”, x1, y1) COLOURED (0,0, 255)
vorrei riportare la scritta Tracy con lo stesso colore impostato (121,20,32), T+2(50,113,12),t+3(256,0,0).
01/12/2017 at 11:47 PM #20958Nicolas Se mi può spiegare come si può fare per inserire delle finestre per l assegnazione veloce delle variabile (come screenshot) poi posto l’indicatore completo nella libreria , grazie mille
01/13/2017 at 9:47 AM #20972A proposito di disegno di testo solo sull’ultimo bar con questo indicatore non è possibile, perché non possiamo sapere in ogni candela se è l’ultima o meno.
Per aggiungere parametri variabili esterne, è necessario impostare quelli nel codice con REM (commentato):
12REM period2=30REM vfactor2=.7o cancellarli del tutto, ma io preferisco commentare loro. Fare lo stesso per tutte le variabili esterne che si desideri aggiungere (all ‘period’ e ‘vfactor’ per questo indicatore).
01/14/2017 at 12:55 AM #21034Ciao e grazie Nicolas purtroppo non riesco ad utilizzare REM period…. come mi hai descritto tu , ma comunque sono riuscito a creare ciò che volevo e ti posto qui lo script (poi lo pubblica anche nella libreria), poi volevo chiederti due cose 1° come mai non riesco ad inserire un valore di periodo superiore a 90 . 2° non ho capito come posso fare per inserire un testo
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071//Tracy//short=8//vfactor=.7Data=customclosex1=(exponentialaverage[short](Data))*(1+vfactor)x2=(exponentialaverage[short](exponentialaverage[short](Data)))*vfactorgd=x1-x2x11=(exponentialaverage[short](gd))*(1+vfactor)x21=(exponentialaverage[short](exponentialaverage[short](gd)))*vfactorgd1=x11-x21x12=(exponentialaverage[short](gd1))*(1+vfactor)x22=(exponentialaverage[short](exponentialaverage[short](gd1)))*vfactorfirst=x12-x22y1=(exponentialaverage[short](Data))*(1+vfactor/2)y2=(exponentialaverage[short](exponentialaverage[short](Data)))*vfactor/2ygd=y1-y2y11=(exponentialaverage[short](ygd))*(1+vfactor/2)y21=(exponentialaverage[short](exponentialaverage[short](ygd)))*vfactor/2ygd1=y11-y21y12=(exponentialaverage[short](ygd1))*(1+vfactor/2)y22=(exponentialaverage[short](exponentialaverage[short](ygd1)))*vfactor/2second=y12-y22S = first - second[1]//T+2//intermediate =32//vfactor=0.7x10=(exponentialaverage[intermediate ](Data))*(1+vfactor)x20=(exponentialaverage[intermediate ](exponentialaverage[intermediate ](Data)))*vfactorgd2=x10-x20x110=(exponentialaverage[intermediate ](gd2))*(1+vfactor)x210=(exponentialaverage[intermediate ](exponentialaverage[intermediate ](gd2)))*vfactorgd20=x110-x210x120=(exponentialaverage[intermediate ](gd20))*(1+vfactor)x220=(exponentialaverage[intermediate ](exponentialaverage[intermediate ](gd20)))*vfactorfirst1=x120-x220y10=(exponentialaverage[intermediate ](Data))*(1+vfactor/2)y20=(exponentialaverage[intermediate ](exponentialaverage[intermediate ](Data)))*vfactor/2ygd2=y10-y20y110=(exponentialaverage[intermediate ](ygd2))*(1+vfactor/2)y210=(exponentialaverage[intermediate ](exponentialaverage[intermediate ](ygd2)))*vfactor/2ygd20=y110-y210y120=(exponentialaverage[intermediate ](ygd20))*(1+vfactor/2)y220=(exponentialaverage[intermediate ](exponentialaverage[intermediate ](ygd20)))*vfactor/2second1=y120-y220S1 = first1 - second1[1]//T+3//long=64//vfactor=.7x100=(exponentialaverage[long](Data))*(1+vfactor)x200=(exponentialaverage[long](exponentialaverage[long](Data)))*vfactorgd3=x100-x200x1100=(exponentialaverage[long](gd3))*(1+vfactor)x2100=(exponentialaverage[long](exponentialaverage[long](gd3)))*vfactorgd30=x1100-x2100x1200=(exponentialaverage[long](gd30))*(1+vfactor)x2200=(exponentialaverage[long](exponentialaverage[long](gd30)))*vfactorfirst2=x1200-x2200y100=(exponentialaverage[long](Data))*(1+vfactor/2)y200=(exponentialaverage[long](exponentialaverage[long](Data)))*vfactor/2ygd3=y100-y200y1100=(exponentialaverage[long](ygd3))*(1+vfactor/2)y2100=(exponentialaverage[long](exponentialaverage[long](ygd3)))*vfactor/2ygd30=y1100-y2100y1200=(exponentialaverage[long](ygd30))*(1+vfactor/2)y2200=(exponentialaverage[long](exponentialaverage[long](ygd30)))*vfactor/2second2=y1200-y2200S2 = first2 - second2[1]return S coloured (255,0,0) as "SHORT" , S1 coloured (0,160,0) as "INTERMEDIATE", S2 coloured (0,0,255) as "LONG" , 0 coloured (1,1,1) as "level 0"01/14/2017 at 1:04 AM #21035Ho aggiunto l’indicatore nella libreria
01/14/2017 at 11:40 AM #2104201/14/2017 at 4:55 PM #21085No non ho ricevuto messaggi d’errore , ora riprovo.
01/14/2017 at 5:49 PM #2109701/15/2017 at 11:06 AM #21153Grazie, ma perché non lo vedo in biblioteca?
-
AuthorPosts
Find exclusive trading pro-tools on