mi sono perso qualcosa?
viene giu tutto come una pera
niente, sono io che ho premuto il tasto sell sul nasdaq
Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature may not be available in some browsers.
mi sono perso qualcosa?
viene giu tutto come una pera
mi sono perso qualcosa?
viene giu tutto come una pera
study("Adm", overlay=true)
gg = input(title="Giorni", type=integer, defval=36, minval=1)
bg = input(title="Barre al giorno", type=integer, defval=24, minval=1)
pb = input(title="Price break", type=float, defval=0.287, minval=0.1)
barre = gg*bg
newbar = change(time("D")) != 0 ? 1 : 0
adm = (sum ((security(tickerid, "D", high[1])-security(tickerid, "D", low[1]))*newbar, barre)) / gg
//non ho ancora trovato un metodo migiore per far capire che serve un valore per ogni giorno
chiusuraieri = security(tickerid, "D", close[1])
compra = chiusuraieri + adm*pb
vendi = chiusuraieri - adm*pb
tp1short = vendi-(0.45*adm)
tp1long = compra+(0.45*adm)
plot (compra, color= fuchsia, title="LONG", linewidth=2)
plot (vendi, color=maroon, title="SHORT", linewidth=2)
plot (compra+(0.45*adm), color=gray, title='TP1 Long')
plot (compra+(0.95*adm), color=gray, title='TP2 Long')
plot (compra+(1.95*adm), color=gray, title='TP3 Long')
plot (vendi-(0.45*adm), color=gray, title='TP1 Short')
plot (vendi-(0.95*adm), color=gray, title='TP2 Short')
plot (vendi-(1.95*adm), color=gray, title='TP3 Short')
max = security(tickerid, "D", high)
min = security(tickerid, "D", low )
tp1longfatto = close[1] < tp1long and close > tp1long ? 1:0
tp1shortfatto = close[1] > tp1short and close < tp1short ? 1:0
entrylong = close[1] > compra and open[1] < compra ? 1 : 0
tp1longok = high > tp1long and not tp1longfatto
entryshort = close[1] < vendi and open[1] > vendi ? 1 : 0
tp1shortok = low < tp1short and not tp1shortfatto
plotshape(entryshort ? - entryshort : na, style=shape.arrowdown,text="Entry Short", location=location.abovebar, size=size.large, textcolor=white, color=maroon)
plotshape(tp1shortok ? tp1short : na, style=shape.diamond, text="TP1 Short", location=location.absolute, size=size.small, textcolor=white, color=white)
plotshape(entrylong ? entrylong : na, style=shape.arrowup, text="Entry Long", location=location.belowbar, size=size.large, textcolor=white, color=fuchsia)
plotshape(tp1longok ? tp1long : na, style=shape.diamond, text="TP1 Long", location=location.absolute, size=size.small, textcolor=white, color=white)
HELP !!!!
chi è chi ma dà una mano col codice di tradingview ? ci sarà qualche programmatore che ci legge
il problema da risolvere è fargli disegnare il diamante del tp1 long o short solo una volta nella giornata, invece che ad ogni barra oraria....
questo il codice:
Codice:study("Adm", overlay=true) gg = input(title="Giorni", type=integer, defval=36, minval=1) bg = input(title="Barre al giorno", type=integer, defval=24, minval=1) pb = input(title="Price break", type=float, defval=0.287, minval=0.1) barre = gg*bg newbar = change(time("D")) != 0 ? 1 : 0 adm = (sum ((security(tickerid, "D", high[1])-security(tickerid, "D", low[1]))*newbar, barre)) / gg //non ho ancora trovato un metodo migiore per far capire che serve un valore per ogni giorno chiusuraieri = security(tickerid, "D", close[1]) compra = chiusuraieri + adm*pb vendi = chiusuraieri - adm*pb tp1short = vendi-(0.45*adm) tp1long = compra+(0.45*adm) plot (compra, color= fuchsia, title="LONG", linewidth=2) plot (vendi, color=maroon, title="SHORT", linewidth=2) plot (compra+(0.45*adm), color=gray, title='TP1 Long') plot (compra+(0.95*adm), color=gray, title='TP2 Long') plot (compra+(1.95*adm), color=gray, title='TP3 Long') plot (vendi-(0.45*adm), color=gray, title='TP1 Short') plot (vendi-(0.95*adm), color=gray, title='TP2 Short') plot (vendi-(1.95*adm), color=gray, title='TP3 Short') max = security(tickerid, "D", high) min = security(tickerid, "D", low ) tp1longfatto = close[1] < tp1long and close > tp1long ? 1:0 tp1shortfatto = close[1] > tp1short and close < tp1short ? 1:0 entrylong = close[1] > compra and open[1] < compra ? 1 : 0 tp1longok = high > tp1long and not tp1longfatto entryshort = close[1] < vendi and open[1] > vendi ? 1 : 0 tp1shortok = low < tp1short and not tp1shortfatto plotshape(entryshort ? - entryshort : na, style=shape.arrowdown,text="Entry Short", location=location.abovebar, size=size.large, textcolor=white, color=maroon) plotshape(tp1shortok ? tp1short : na, style=shape.diamond, text="TP1 Short", location=location.absolute, size=size.small, textcolor=white, color=white) plotshape(entrylong ? entrylong : na, style=shape.arrowup, text="Entry Long", location=location.belowbar, size=size.large, textcolor=white, color=fuchsia) plotshape(tp1longok ? tp1long : na, style=shape.diamond, text="TP1 Long", location=location.absolute, size=size.small, textcolor=white, color=white)
Vedi l'allegato 2319153
ciao, non conosco il linguaggio... tendenzialmente:
potresti usare 6 variabili per ogni compra/vendi+/-(coeff*adm) che si azzerano se il tp è stato fatto;
oppure potresti fare il "plot" se il tp non è stato fatto (una sorta di do-while)
buongiorno a tutti e buon we
sono rimasto over long, non tranquillissimo ma long. Ho pure preso 1 lotto intesa (ero flat di titoli) a 2
MIB settimanale
Sul settimanale invece il quadro mi sembra più neutro. Per la treza settimana consecutiva il valore di chiusura della candela è praticamente invariato e lunghe shadows sia superiori che inferiori indicano un mercato molto incerto sulla direzione da prendere. Pochi supporti significativi in zona
Vedi l'allegato 2319206
HELP !!!!
chi è chi ma dà una mano col codice di tradingview ? ci sarà qualche programmatore che ci legge
il problema da risolvere è fargli disegnare il diamante del tp1 long o short solo una volta nella giornata, invece che ad ogni barra oraria....
questo il codice:
Codice:study("Adm", overlay=true) gg = input(title="Giorni", type=integer, defval=36, minval=1) bg = input(title="Barre al giorno", type=integer, defval=24, minval=1) pb = input(title="Price break", type=float, defval=0.287, minval=0.1) barre = gg*bg newbar = change(time("D")) != 0 ? 1 : 0 adm = (sum ((security(tickerid, "D", high[1])-security(tickerid, "D", low[1]))*newbar, barre)) / gg //non ho ancora trovato un metodo migiore per far capire che serve un valore per ogni giorno chiusuraieri = security(tickerid, "D", close[1]) compra = chiusuraieri + adm*pb vendi = chiusuraieri - adm*pb tp1short = vendi-(0.45*adm) tp1long = compra+(0.45*adm) plot (compra, color= fuchsia, title="LONG", linewidth=2) plot (vendi, color=maroon, title="SHORT", linewidth=2) plot (compra+(0.45*adm), color=gray, title='TP1 Long') plot (compra+(0.95*adm), color=gray, title='TP2 Long') plot (compra+(1.95*adm), color=gray, title='TP3 Long') plot (vendi-(0.45*adm), color=gray, title='TP1 Short') plot (vendi-(0.95*adm), color=gray, title='TP2 Short') plot (vendi-(1.95*adm), color=gray, title='TP3 Short') max = security(tickerid, "D", high) min = security(tickerid, "D", low ) tp1longfatto = close[1] < tp1long and close > tp1long ? 1:0 tp1shortfatto = close[1] > tp1short and close < tp1short ? 1:0 entrylong = close[1] > compra and open[1] < compra ? 1 : 0 tp1longok = high > tp1long and not tp1longfatto entryshort = close[1] < vendi and open[1] > vendi ? 1 : 0 tp1shortok = low < tp1short and not tp1shortfatto plotshape(entryshort ? - entryshort : na, style=shape.arrowdown,text="Entry Short", location=location.abovebar, size=size.large, textcolor=white, color=maroon) plotshape(tp1shortok ? tp1short : na, style=shape.diamond, text="TP1 Short", location=location.absolute, size=size.small, textcolor=white, color=white) plotshape(entrylong ? entrylong : na, style=shape.arrowup, text="Entry Long", location=location.belowbar, size=size.large, textcolor=white, color=fuchsia) plotshape(tp1longok ? tp1long : na, style=shape.diamond, text="TP1 Long", location=location.absolute, size=size.small, textcolor=white, color=white)
Vedi l'allegato 2319153