Fractal Zig Zag continuare a tracciare durante l'ultimo periodo
Forums › ProRealTime forum Italiano › Supporto ProBuilder › Fractal Zig Zag continuare a tracciare durante l'ultimo periodo
- This topic has 10 replies, 4 voices, and was last updated 5 years ago by
Nicolas.
-
-
05/21/2019 at 1:27 PM #99014
Per il codice in copia è possibile che oltre a disegnare il segmento dall’ultimo punto di inversione ne disegni anche uno che vada all’ultimo prezzo e si muova con esso.
Grazie
//—external parameters
cp = 26
once lastpoint = 0
if high[cp] >= highest[2*cp+1](high) then
LH = 1
else
LH = 0
endifif low[cp] <= lowest[2*cp+1](low) then
LL = -1
else
LL = 0
endifif LH = 1 then
TOPy = high[cp]
TOPx = barindex[cp]
endifif LL = -1 then
BOTy = low[cp]
BOTx = barindex[cp]
endifif LH>0 and (lastpoint=-1 or lastpoint=0) then
DRAWSEGMENT(lastX,lastY,TOPx,TOPy) COLOURED(255,255,0)
lastpoint = 1
lastX = TOPx
lastY = TOPy
endifif LL<0 and (lastpoint=1 or lastpoint=0) then
DRAWSEGMENT(lastX,lastY,BOTx,BOTy) COLOURED(255,255,0)
lastpoint = -1
lastX = BOTx
lastY = BOTy
endifRETURN
05/21/2019 at 1:45 PM #9901612345678910111213141516171819202122232425262728293031323334353637383940414243//—external parameterscp = 26once lastpoint = 0if high[cp] >= highest[2*cp+1](high) thenLH = 1elseLH = 0endifif low[cp] <= lowest[2*cp+1](low) thenLL = -1elseLL = 0endifif LH = 1 thenTOPy = high[cp]TOPx = barindex[cp]endifif LL = -1 thenBOTy = low[cp]BOTx = barindex[cp]endifif LH>0 and (lastpoint=-1 or lastpoint=0) thenDrawSegment(lastX,lastY,TOPx,TOPy) coloured(255,255,0)lastpoint = 1lastX = TOPxlastY = TOPyendifif LL<0 and (lastpoint=1 or lastpoint=0) thenDrawSegment(lastX,lastY,BOTx,BOTy) coloured(255,255,0)lastpoint = -1lastX = BOTxlastY = BOTyendifreturnHello Hendrix, the button [Insert PRT code] is your friend 😉
05/21/2019 at 2:10 PM #9901805/21/2019 at 3:17 PM #9902505/21/2019 at 4:10 PM #9904205/21/2019 at 4:32 PM #99046Poiché non è possibile eliminare tutti gli oggetti già tracciati sul grafico, è necessario creare un indicatore separato che rappresenti solo l'ultimo segmento collegato al prezzo corrente. Quindi per favore aggiungi questo indicatore come complemento del primo sul grafico per ottenere la versione completa:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051defparam drawonlastbaronly=true//—external parameterscp = 26once lastpoint = 0if high[cp] >= highest[2*cp+1](high) thenLH = 1elseLH = 0endifif low[cp] <= lowest[2*cp+1](low) thenLL = -1elseLL = 0endifif LH = 1 thenTOPy = high[cp]TOPx = barindex[cp]endifif LL = -1 thenBOTy = low[cp]BOTx = barindex[cp]endifif LH>0 and (lastpoint=-1 or lastpoint=0) then//DrawSegment(lastX,lastY,TOPx,TOPy) coloured(255,255,0)lastpoint = 1lastX = TOPxlastY = TOPyendifif LL<0 and (lastpoint=1 or lastpoint=0) then//DrawSegment(lastX,lastY,BOTx,BOTy) coloured(255,255,0)lastpoint = -1lastX = BOTxlastY = BOTyendifif lastpoint>0 thenDrawSegment(lastX,lastY,barindex,low) coloured(55,55,50)elsif lastpoint<0 thenDrawSegment(lastX,lastY,barindex,high) coloured(55,55,50)endifreturn05/22/2019 at 7:30 AM #9910605/22/2019 at 7:53 AM #9910805/22/2019 at 8:07 AM #99109Non si può aumentare lo spessore, né lo stile, di linee disegnate con i comandi DRAW.
Solo le linee disegnate con RETURN possono essere personalizzate.
05/22/2019 at 8:22 AM #9911005/22/2019 at 9:46 AM #99129Non hai letto il mio ultimo post! DEVI AGGIUNGERE I 2 INDICATORI SULLA GRAFICA PER OTTENERE UNA VERSIONE COMPLETA. Aggiungi il primo indicatore che hai pubblicato, quindi aggiungi quello che ho creato, solo i 2 indicatori potrebbero fornire quello che ti serve.
-
AuthorPosts