16/10/11

il diffrs di caruso

rsi1=rsi[4](Close)
rsi2=rsi[14](Close)
diffRS=exponentialaverage[3](exponentialaverage[3](rsi1-rsi2))
return diffRS

//////
FEAR/COMPLACENCY (FC) INDICATOR. Il SETUP di vendita arriva quando, in un trend ribassista, il DIFFRS va sopra 80 o – ancora meglio – quando arriva a 100. Quando si gira al ribasso, compare la freccia rossa (e viceversa al rialzo con i livelli 20 e 0). Ecco la situazione sul MIB: come si vede, è già in atto il SETUP. Ma non c’è ancora il segnale.

14/10/11

31/08/11

http://dl.dropbox.com/u/7680330/sole%20studio.pdf

30/08/11

maurizio piglia ha scritto

Coca Cola, Gillette, Procter e Gamble, Unilever, Kraft, Mac Donald, questi sono i nomi USA su cui puoi puntare...ma e' un po' presto...credo che l'obiettivo effettivo dello S&P 500 sia tra i 950 e i 1000 prima che i prezzi siano appetibili. Diciamo che puoi comprare " dollar cost averaging" piano piano da una rottura di 1100 verso il basso...manca mica tanto. Sul $ Usa...hai ragione nel breve. Nel lungo potrebbero ricominciare a stampare furiosamente.Ma nel breve qualcosina dovrebbe riprendersi sull'Euro. L'Euro ha i suoi problemi...ma se, per ora, guadagni e spendi in Euro, la teoria ti direbbe stai nella valuta tua...Ma tieni presente che da uno sconquasso strutturale come questo...non c'e' salvezza assoluta. Si puo' solo limitare i danni...o poter andare anche short, essere bravi...e veloci.
Auguri Dario.

17/08/11

nilo60 ha scritto

Tradare in multi frame futures e non solo,
Come scritto già più volte io trado in multi frame il nostro futures su SPMIB sul daily, 60 minuti, 30 minuti, e 5 minuti,per tradare in multi frame con questo sistema occorrono 2 conti,spesso e volentieri ci si può trovare long sul daily e short sul 60 /30 minuti o viceversa, mio consiglio usare il minifib sul daily, 60/30 minuti perchè ci sono stop molto ampi, mentre sul 5 minuti per chi lo desidera si può tradare il fib con target e stop stretti.
Il metodo e ottimo anche su azionario e su qualsiasi strumento finanziario purchè sia liquidi
i miei trading system non sono infallibili ma si difendono….. in alcuni periodi è più performante il daily, in altri il 60 minuti, in altri ancora il 30 minuti, per questo motivo li seguo tutti ed in qualche modo si porta a casa un discreto gain.
Sul daily entro con 2 contratti il primo contratto ho stop profit di 500 punti e stop loss di 250 , mentre con il secondo contratto ho stop loss variabile molto ampio e si segue in trailing stop .
Sul 60 minuti 6 contratti , con 3 contratti stop loss-150 e target +50 punti, con 1 contratto target +150 e stop loss-150,con 1 contratto target +300 e stop loss variabile, con 1 contratto seguo in trailing stop variabile.
Sul 30 minuti 6contratti, con 3 contratti target +40 punti e stop -100 punti,con 1 contratto target +100 e stop -100, con 1 contratto target+300 e stp variabile, con 1 contratto seguo in trailing stop.
Sul 5 minuti 3 contratti, con 2 target +25 punti e stop loss variabile, con 1 target +50 punti e stop variabile.
Il daily , il 60 e il 30 minuti vanno overnight
mentre il 5 minuti chiude le posizioni alle 17/ 17,30 .

30/06/11

prorealtime squeeze

// MACD ZERO LAG 9.19.6

// p= variable macd zerolag
// q= variable signal
// r= variable macd - Mais virer le signal histogramme (invisible sur PRT)

z1=DEMA[p](close)


z2 =dema[q](close)

e= z1 - z2



z3=DEMA[r](e)

f=z3

g=e-f

return e AS "MACD ZEROLAG",f AS "signal",g as "macd-signal",0 as "zero"


Canaux de Keltner



Var: N (periode = 20)
coeff (1.5)



//Canaux de Keltner
REM Moving Average
MA = Average[N](TypicalPrice)

REM Upper Keltner Band

UpperBand = MA + coeff*Average[N](Range)

REM Lower Keltner Band

LowerBand = MA - coeff*Average[N](Range)

RETURN MA AS "Keltner Moving Average" , UpperBand AS "Upper Keltner Band" , LowerBand as "Lower Keltner Band"




Squeeze à la Carter



REM Moving Average
MA = Average[20](TypicalPrice)

REM Upper Keltner Band

UpperBand = MA + 1.5*Average[20](Range)

REM Lower Keltner Band

LowerBand = MA - 1.5*Average[20](Range)


Indicator1 = UpperBand
Indicator2 = LowerBand
Indicator3 = BollingerUp[20](Typicalprice)
Indicator4 = BollingerDown[20](Typicalprice)
C1 = (Indicator1 > Indicator3)
C2 = (Indicator2 < Indicator4) If C1 and C2 then I = 2 Else I = 0 Endif Return I  MACD Accélération indicator1 = MACDline[9,19,6](close) indicator2 = Average[20](MACDline[9,19,6](close)) + 1.4*std[20](MACDline[9,19,6](close)) indicator3 = Average[20](MACDline[9,19,6](close)) - 1.4*std[20](MACDline[9,19,6](close)) if indicator1 >= indicator2 then
i = 2
elsif indicator1 <= indicator3 then i = -2 else i=0 endif return i ET MACD a=STD[20](MACDline[9,19,6](close)) return a High Low ET MACD+30% L=Lowest[70](STD[20](MACDline[9,19,6](close)))*1.3 return L Squeeze MACD indicator1=CALL"ET MACD" rem userindic1=CALL"ET MACD" indicator2=CALL"High Low ET MACD+30%" c1=(indicator1<=indicator2) if C1 then I=2 else I=0 endif return i Squeeze + Div Détection MACD // il faut y intégrer les indicateurs de squeeze et de divergence a=0 return a OBVD Variables coeff (1.68) period (20) Rem OBVD JL if barindex < period then ob = 0 else ob = OBV(TypicalPrice) endif a = average[period](ob) st = std[period](ob) bsup = a + coeff*st binf = a- coeff*st return ob as "OBV", bsup as "Bsup", binf as "Binf", a as "Average"   ET OBVD a = STD[20](OBV(Typicalprice)) return a High Low ET OBVD +30% L = Lowest[100](STD[20](OBV(Typicalprice)))*1.3 return L Squeeze OBVD indicator1=CALL"ET OBVD" rem userindic1=CALL"ET OBVD" indicator2=CALL"High Low ET OBVD +30%" c1=(indicator1<=indicator2) if C1 then I=2 else I=0 endif return i Squeez + Div detection OBVD // il faut y intégrer les indicateurs de squeeze et de divergence A=0 Return a   OBVD Accélération indicator1 = (OBV(Typicalprice)) indicator2 = Average[20](OBV(Typicalprice))+1.68*std[20](OBV(Typicalprice)) indicator3 = Average[20](OBV(Typicalprice))-1.68*std[20](OBV(Typicalprice)) if indicator1 >= indicator2 then
i = 2
elsif indicator1 <= indicator3 then
i = -2
else
i=0
endif

return i


Bon Trades

Nous restons tous en attente des travaux de Flodub et Legou sur l’optimisation de l’indicateur d’accélération

Y en a qui on de la chance quand même d'être en vacances...

14/04/11

RIEPILOGO DELLE RELAZIONI PREDOMINANTI

RIEPILOGO DELLE RELAZIONI PREDOMINANTI :
1) il dollaro statunitense esprime generalmente un andamento OPPOSTO a quello dell'oro ed a quello dell'indice CRB delle materie prime (l'andamento dell'oro anticipa quello dell'indice CRB);
2) l'indice CRB esprime generalmente un andamento OPPOSTO a quello delle quotazioni obbligazionarie;
3) le quotazioni obbligazionarie esprimono generalmente un andamento ANALOGO ed anticipatore del mercato azionario;
4) l'andamento dell'indice DJ Utilities segue quello delle obbligazioni ed anticipa anch'esso quello del mercato azionario;
5) l'andamento di alcuni settori azionari (petrolifero, aurifero, ecc.) risulta influenzato da quello delle rispettive materie prime;  l'andamento di altri settori (finanziario, bancario e utilities) invece risulta particolarmente influenzato da quello delle quotazioni obbligazionarie.

13/04/11

Prime Brokerage Economici

dal  sito:http://finantrade.blogspot.com

Prime Brokerage Economici

Per ottenere una tariffa bassa di commissione, di solito un investitore o un commerciante dovra' sacrificare alcuni strumenti di investimento come la creazione di grafici , lo strumento fiscale, i servizi finanziari, la capacità di trasferimento ecc . È possibile integrare  la mancanza di caratteristiche aprendo un altro account con un servizio completo di intermediazione, come Fedeltà, Schwab, ecc oppure si può semplicemente utilizzare il servizio Internet come stockcharts & finviz per la creazione di grafici e analisi.

Top 10 online più economici agenti di borsa nel commercio stock o ETF sono:
1. Lightspeed Trading
Lightspeed è  conosciuto dai traders per la loro esecuzione veloce attraverso la loro piattaforma software Lightspeed Trader. E 'anche conosciuto come uno dei più economici della borsa online, così come uno dei migliori mediatori online . Lightspeed offre stock, etf, opzioni, forex e futures per la negoziazione.   Se si utilizza Lightspeed Trader, che è la piattaforma software  , il requisito patrimoniale minimo è di $ 10.000. Per il commercio del forex e il future   si prega di consultare il sito web per maggiori dettagli.

2. Interactive Brokers
Interactive Brokers (IB) offre azioni, etf, opzioni, fondi comuni di investimento, forex e future. IB è un altro che ha commissioni di intermediazione basse IB broker è famoso tra gli operatori attivi e coloro che cercano una variegata struttura  . Per acquistare stock, solo costo di $ 0,005 per azione con 1,00 dollari minimo per il commercio e un massimo di 0,5% del valore commerciale. La struttura delle tariffe è fatta per abbassare le commissioni per l'operatore . Non vi è alcuna tassa per acquistare l'opzione, ma solo costo di $ 0.70 per contratto di opzione. Il saldo minimo per aprire è piuttosto elevato, però, avrete bisogno di 10 mila dollari per aprire un conto.
3. Just2trade
Just2trade stock offerte, ETF, opzioni, fondi comuni. Quello che mi piace di Just2trade è che offre   in commissione tasso di $ 2.50 per il commercio. Per acquistare stock, solo costo di $ 2,50 indipendentemente dalla quantità di azioni. Per il commercio opzione, che costerà $ 2.50 e $ 0.50 / contratto. Il saldo minimo per aprire un conto è di soli $ 2.500. È anche possibile impresa sul mercato pre e dopo ore di mercato per le spese extra. Just2trade offre anche un livello 2 citando gratuitamente utilizzando J2trader.
4. OptionsHouse
OptionsHouse offre stock, ETF, opzione e fondi comuni. OptionsHouse offre anche una  commissione tasso di $ 2.95 al commercio. Se si acquistano stock o vendere azioni / ETF, che vi costerà solo 2,95 dollari per il commercio. Ci sono 2 strutture diverse commissioni di trading delle opzioni, il primo piano è di durata inferiore trader attivi e l'altra è per trader attivi. Per i trader meno attivi, che costerà $ 5,00 per un massimo di 5 contratti. contratto aggiuntivo costerà 1,00 $ addizione. Mentre per i trader attivi, che costerà 8,50 dollari e 0,15 dollari per contratto. Il saldo minimo per aprire un conto è di soli $ 1.000.
5. eOption
eOption stock offerte, ETF, opzioni, fondi comuni. eOption offre anche un fisso in commissione tasso di 3,00 dollari al commercio. eOption è particolarmente famoso per trader opzione complessi. slogan è EOption Esercizio tua opzione Salva. Per il commercio di scorta, solo ti costerà $ 3.00 al commercio. Non vi è alcun limite di importo parti. Per il commercio opzione, costerà $ 3.00 e $ 0.10 per contratto. Non vi è alcun importo minimo per aprire un conto. (Vale a dire minimo è di $ 0.)
6. SogoTrade
SogoTrade stock offerte, ETF, e le opzioni. Come una società di intermediazione fisso tasso di provvigione, SogoTrade offre al commercio magazzino per $ 3.00 al commercio. Non vi è alcun limite di importo parti. Per il commercio opzione, costerà 5,00 dollari e 0,65 dollari per contratto. Il saldo minimo per aprire un conto è di soli $ 500. Inoltre, è possibile impresa sul mercato pre e dopo ore di mercato per le spese extra.
zecco centro commerciale di
7. Zecco trading
Zecco stock offerte, ETF, Opzioni, Forex, e fondi comuni. Per il commercio stock, costa solo 4,50 dollari per il commercio. E 'anche una delle commissioni di intermediazione flat rate e non vi è alcun limite all'importo azioni. Per il commercio opzione, solo costo di $ 4.50 e $ 0.50 per contratto. Non vi è alcun importo minimo di equilibrio per aprire un conto. Una delle cose migliori con il commercio Zecco è di 10 mestieri gratuito. Titolare di un conto possono beneficiare per 10 operazioni gratuite al mese se il saldo del conto è di $ 25.000.
8. TradeKing
TradeKing offre azioni, ETF, opzioni, fondi comuni. E 'anche un altro flat broker Commissione velocità e non c'è limite alla quantità azioni. Per il commercio stock, che costerà $ 4.95 al commercio. Se un determinato stock di sotto $ 1,00 per azione, vi è un supplemento di $ 0,01 per azione paga (commissioni max 5% del valore commerciale). Per il commercio opzione o acquistare o vendere un'opzione, ma solo costo $ 4,95 e $ 0,65 per contratto. Non vi è alcun importo minimo di equilibrio per aprire un conto.
9. MB Trading
MB Trading ha ampia scelta offerta di prodotti. MB Trading offre stock, etf, opzioni, future, Forex, e di fondi comuni. Per il commercio stock, costa solo $ 4.95 al commercio. E 'anche uno dei piatti di intermediazione in commissione tasso e non c'è limite alla quantità azioni. Per il commercio opzione, solo costo di 0,50 dollari per contratto. Non c'è tassa di opzione per l'opzione di negoziazione. Il saldo minimo per aprire un conto è di soli $ 1.000.
10. Lowtrades
Lowtrades ha la stessa direzione Just2trade. Lowtrades offre anche le scorte, ETF, opzioni, fondi comuni. Per acquistare stock, solo costo di $ 4,95 indipendentemente dalla quantità di azioni. Per il commercio opzione, che costerà 4,95 $ e quota 0,60 dollari per contratto. Il saldo minimo per aprire un conto è di soli $ 2.500. È anche possibile impresa sul mercato pre e dopo ore di mercato per le spese extra. Vi è una tassa di inattività di $ 50 per ogni 6 mesi.

Altre società di intermediazione

Per riferimento ho da fornire l'elenco di altri per il confronto, come thinkorswim, Scottrade, Fedeltà, E * Trade, Schwab, TD Ameritrade, WellsTrade, Avanguardia e altro ancora.

Top 30 Promotori Discount a basso costo


No  
Broker  
100 parti  
500 parti  
1.000 parti  
Saldo minimo  
1
Lightspeed Trading
$1.00
$2.25
$4.50
$1,000
2
Interactive Brokers
$1.00
$2.50
$5.00
$10,000
3
Just2trade
$2.50
$2.50
$2.50
$2,500
4
OptionsHouse
$2.95
$2.95
$2.95
$1,000
5
eOption
$3.00
$3.00
$3.00
$0
6
SogoTrade
$3.00
$3.00
$3.00
$500
7
Zecco
$4.50
$4.50
$4.50
$0
8
TradeKing
$4.95
$4.95
$4.95
$0
9
MB Trading
$4.95
$4.95
$4.95
$1,000
10
LowTrades
$4.95
$4.95
$4.95
$2,000
11
Questrade
$4.95
$5.00
9.95
$1,000
12
Choicetrade
$5.00
$5.00
$5.00
$0
13
Thinkorswim (TOS)
$5.00
$7.50
$9.95
$3,500
14
Firstrade
$6.95
$6.95
$6.95
$0
15
Scottrade
$7.00
$7.00
$7.00
$500
16
tradeMONSTER
$7.50
$7.50
$7.50
$2,000
17
Fedeltà
$7.95
$7.95
$7.95
$2,500
18
Noble Trading
$7.95
$7.95
$7.95
$500
19
Charles Schwab
$8.95
$8.95
$8.95
$1,000
20
Bank of America / Merrill Edge
$8.95
$8.95
$8.95
$2,000
21
optionsXpress
$9.95
$9.95
$9.95
$0
22
ShareBuilder
$9.95
$9.95
$9.95
$0
23
TD Ameritrade
$9.99
$9.99
$9.99
$2,500
24
E * TRADE
$9.99
$9.99
$9.99
$500
25
TradeStation
$9.99
$9.99
$9.99
$5,000
26
Muriel Siebert
$14.95
$14.95
$14.95
$0
27
WellsTrade
$19.95
$19.95
$19.95
$1,000
28
Avanguardia
$20.00
$20.00
$20.00
$0
Tabella di confronto

22/03/11

mogalef/pseudo,mogalef

DH=highest[per](high)

DB=lowest[per](low)

//////////difference entre le plushaut et le plus bas

retlungo= (dhh +dbb)/2
////////////////////////////////////////////////////
DHh=highest[perlungo](high)

DBb=lowest[perlungo](low)
if close > retlungo then
   
    alto=dhh
else
    alto=dh
endif

if close > retlungo then
   
    basso=db
else
    basso=dbb
endif
ret90=(highest[90](high)+lowest[90](low))/2
return alto as"bandaup",basso as"bandadown",basso+((alto-basso)/2) as"median bands",exponentialaverage[20](basso+((alto-basso)/2))as"media median bands",ret90 as"ret90",average[150](ret90) as"mediaret90"

06/03/11

cumulative volume delta

Some would call it Accumulation/Distribution, but whatever the name there is some useful insight to be gained by examining it.

Security:   QQQ
Position:   N/A
A common way to understand what has happened during a trading day is to calculate the Balance of Market Power, BMP (see posting "Balance of Market Power," 8/22/2001). BMP consists of the close minus the opening divided by the high minus the low:

BMP = (close-open)/(high-low).

If you multiply BMP by volume and make a running sum by adding each interval's data to the next, you get what some authors call accumulation/distribution, A/D. The calculations for this are:

A/D= cumulative sum of ((close-open)/(high-low))*volume.

However, some (Metastock and Tradestation) use:

A/D=cum((((close-low) - (high-close)) / (high-low)) * volume).

If you do the math it reduces to:

A/D=cum (((2*close-high-low)/ (high-low))*volume),

which some call intraday intensity. Putting aside the labels and dealing with A/D defined with close-open, versus 2*close -high-low, the difference is that when you use two values of closing price you are weighting the indicator towards the closes of the day. When you use a formula like BMP you are asking, how does:

range between close and open (close-open)

compare to:

range between high and low (high-low)?

The range comparison works because on bullish days the open is near to the low and the close is near the high, and just the opposite for bearish days. Between these two extremes, (c-o)/(h-l) goes from +1 to -1.

If you are going to weight volume for a trading signal, why not weight volume using BMP, and then as a refinement make your weighting scheme put emphasis on closing prices. The end result is A/D. So the rule you can use to invent your own volume indicator is to take whatever you have that measures the daily bullishness or bearishness, multiply by volume, and accumulate. When you start to classify indicators as being a form of range sensitivity measurement you'll find that a lot of indicators can be thrown into that category. Inside days, outside days, and NR4 days are examples.


You can go one step further in building your own volume indicators and, rather than accumulate, you could normalize over a period of days. John Bollinger suggests the following:

Sum((2*close-high-low)/(high-low)*volume,21)/Sum(volume,21),

which is to sum your volume-weighted indicator over a period of time and divide by the sum of volume over the same period of time. In the example a 21-day sum of volume weighted by 2*close-high-low is divided by the 21-day sum of volume and I am going to call this normalized A/D.



Figure 1: QQQ Daily Price and Volume (bottom chart) and Normalized A/D (top chart). Normalized A/D is well behaved because: (1) Despite differences in average volume it still moves between the same extremes of +0.3 and -0.3, (2) While QQQ was trending up it was predominantly positive and while QQQ was trending down it was predominantly negative and (3) When normalized A/D exceeds .12 or so it will often continue onto an extreme. Could 0.12, or something close to it, be used as threshold?
Graphic provided by: MetaStock.
Graphic provided by: Data vendor: eSignal<.

If you plot this indicator of a normalized version of A/D, or intraday intensity, of daily QQQ you notice that it is predominantly positive when QQQ is bullish and predominantly negative when QQQ is bearish (Figure 1: top chart). Another nice feature is that when you compare the volume in 1999 with that in 2001 you notice there is considerably more volume for QQQ, but because you have normalized, the extremes of normalized A/D still range between -0.3 and +0.3 (more on this later). The question naturally arises, is this indicator tradeable?


Figure 2: Daily QQQ Price and Volume for 2000 (bottom two charts), ZigZag(75%) Overlaid on Normalized A/D (third chart from top), True/False Conditions for Two Events (second chart from top) and Equity Performance (top chart). Each green up arrow is a long entry, with the exit denoted by a red sign with 'EXIT' in white, and each red down arrow is a short entry with a red exit sign. The third chart from the top shows the true/false condition for long entry, with +1 being the true condition for long entry and -1 the condition for short entry. When ZigZag(75%) exceeds the threshold of +0.12 and is increasing, the long position is true, and when ZigZag(75%) goes below the threshold of -0.12 and is decreasing, the short position is true. The time spent in either a long or short position is equivalent to how long ZigZag(75%) spends going up or down after exceeding the threshold of +0.12 or -0.12.

When I examine June through October 2000 in detail (Figure 2), I see that as I approach a major peak or valley of normalized A/D, QQQ prices are following nicely and all I need to do is exit as soon as the peak or valley is reached. In order to encode a description that a trading system could use, I applied ZigZag at 75% to normalized A/D (Figure 2: third chart from top). Seventy five percent for ZigZag was arrived at by just some quick eyeballing to eliminate unwanted changes in ZigZag so I could capture the major peaks and valleys.

Unfortunately even at 75% I was still seeing small changes about the zero line of normalized A/D so I had to add a filter. I ignored any value of ZigZag(75%) less than 0.12. Now I wanted to see what logic indicators would look like for:

condition1 = ZigZag(75%) increasing and greater than 0.12,

and

condition2= ZigZag(75%) decreasing and less than -0.12.

I got the result I'd hoped for (Figure 2: second chart from top) when I plotted condition1 as 0, +1 and condition2 as 0, -1. I then built the system test and it made a profit (Figure 2: top chart).




Figure 3: QQQ Daily Price and Volume (bottom two charts), True/False Conditions for Long and Short Entry (second chart from top) and Equity Performance. Green long entries predominate during bullish runs of QQQ, while red short entries dominate during bearish runs of QQQ.

The entire performance (Figure 3) met my expectations, including the drawdown in December, 2000. December saw a lessening of bearishness, followed by increased bearishness. This problem could be addressed by using something more sensitive than 75% ZigZag. Figure 3 shows that with a trading system going long when condition1 is true and short when condition2 is true, and exiting whenever they are false, that long trades predominated when QQQ is bullish and short trades when QQQ is bearish.

If you want to get in earlier, then reduce the 0.12 filter for ZigZag; but of course you might want to change ZigZag to something other than 75%. But this is the crux of using this approach. What I did to make it work was observe that normalized A/D is well behaved. Not only it did fluctuate between -0.3 and +0.3 but I also counted on having it either make small changes (abs(normalized A/D) < +-0.12) or major changes. Whether or not this holds for the future depends on how well the market can be measured by BMP or
(2*close-high-low)/(high-low). The Metastock formulas I used are cut and pasted below. You'll notice that I did no optimization.

Long entry:
II:=Sum((2*CLOSE-HIGH-LOW)/(HIGH-LOW)*VOLUME,21)/Sum(V,21);
var1:=Zig(ii,75,%);
cond1:=var1>Ref(var1,-1) AND var1>.12;
cond1>0

Long exit:
II:=Sum((2*CLOSE-HIGH-LOW)/(HIGH-LOW)*VOLUME,21)/Sum(V,21);
var1:=Zig(ii,75,%);
cond1:=var1>Ref(var1,-1) AND var1>.12;
cond1<1

Short entry:
II:=Sum((2*CLOSE-HIGH-LOW)/(HIGH-LOW)*VOLUME,21)/Sum(V,21);
var1:=Zig(ii,75,%);
cond2:=var1cond2>0

Short exit:
II:=Sum((2*CLOSE-HIGH-LOW)/(HIGH-LOW)*VOLUME,21)/Sum(V,21);
var1:=Zig(ii,75,%);
cond2:=var1cond2<1

The statistics are: annual pct/gain loss= 69.23% versus annual buy/hold pct/gain loss=-8.69%, with 22 winning trades, 5 losing trades, average win=$91.96, average loss=-$25.30, biggest win=$447.14, and biggest loss=-$65.59.

A word of caution: Using ZigZag in this kind of trading strategy has an element of looking ahead since ZigZag sees where a turning point is by virtue of knowing prices before and after the turning point. In reality you have two choices you can make to overcome the ZigZag "look ahead." First, given that normalized A/D is well behaved then when it reaches +0.3, or -0.3, then either get out or reverse your position. But obviously +0.3 or -0.3 aren't always going to work because normalized A/D isn't always going to reach those extremes. The second choice is to look at how steep the ascent or descent is of normalized A/D. The detail of Figure 2 is chosen on purpose to illustrate this conjecture. If you compare each of the ZigZag peaks and valleys you'll see the greatest value of normalized A/D was reached when the slope of the ZigZag was the greatest, after breaking the threshold (Figure 2: third chart from the top at the end of August). If you now look at Figure 1 again with the rate of change in mind, you'll see that both negative extremes occurred with the steepest descents. This is a conjecture; the limitations of Metastock do not allow me to explore it in detail, but I suspect that a refinement in looking for an extreme could be found using this technique. In any event, normalized A/D is certainly worthwhile as a confirming indicator and used in conjunction with Bollinger upper- or lower-band walkers should work rather well.





Dennis Peterson

21/02/11

SUPER TREND RSI

p=  période rsi défaut = 9
//////////////////ATR_RSI
rc=rsi[p](close)
rh=rsi[p](high)
rl=rsi[p](low)

c1 =abs( rh - rl)
c2 = abs( rc[1]-rh )
c3 = abs ( rc[1] - rl )
c4 = max(c1,c2)
c5 = max(c4,c3)
atr =average[bb](c5)
//////////////////////////////////////////////
/////SUPER TREND RSI
avg=rc
up=avg+aa*atr
dn=avg-aa*atr
/////////////////////////////////////////////////////////
once trend=1
if rc>up[1] then
 trend=1
elsif rc
 trend=-1
endif
if trend<0 and trend[1]>0 then
 flag=1
else
 flag=0
endif
if trend>0 and trend[1]<0 then
 flagh=1
else
 flagh=0
endif
if trend>0 and dn
 dn=dn[1]
endif
if trend<0 and up>up[1] then
 up=up[1]
endif
if flag=1 then
 up=avg+aa*atr
endif
if flagh=1 then
 dn=avg-aa*atr
endif
if trend=1 then
 super=dn

else
 super=up

endif
return super coloured by trend  as "supertrend_rsi",rc as "rsi" ,70 as "70",50 as "50",30 as "30"

 ////////////////////////////////////fin du code --- END 

02/02/11

indicatori,

////////////////volumi.pos.e.neg.
volpos=0
volneg=0
for n=m downto 1
  
    if close[n-1]=>open[n-1] then
        volpos=volpos+volume[n-1]
    elsif close[n-1]
        volneg=volneg-volume[n-1]
    endif
next
return volpos coloured(0,255,0) as "VOLUMI POSITIVI", volneg coloured(255,0,0) AS "VOLUMI NEGATIVI",0 as"zero",tema[m](volpos+volneg)as " trigger"

////////////////sintonia volume prezzo
a=close/average[20](volume)
return close*a

31/01/11

ind prorealtime

////////bdm volume
//p=4//////pp=15

calc=MoneyFlow[p](close)* Range[p]


///////////////////////////////////////////////
a=lowest[p](calc+low)
b=average[pp](a)
c=b/b[1]-1
d=highest[p](calc+high)
e=average[pp](d)
f=e/e[1]-1
return c*10000 coloured(255,0,0)as"bdmlowvol",f*10000 coloured(0,255,0)as "bdmhighvol",30as"su",-30as"giu"
///////////////////////////////////////////
///////commodity gilmore index
///////a=19  oppure 25
/////////b=18   oppure  28
////////////c=38  oppure  26

return (diplus[a]+diplus[b])-diplus[c]coloured(0,0,255)as"gilmorecorto",25COLOURED(255,0,0)as"25short",15COLOURED(0,255,0)as"15long",(diplus[a*2]+diplus[b*2])-diplus[c*2]coloured(0,0,100)as"gilmorelungo",20COLOURED(0,0,255)as"Centro"
///////////////////////////////////////////////
////stoc   sestetto
///p=10

piuAlto = HIGHEST[p](HIGH)
piuBasso = LOWEST[p](LOW)



oscillatore = (CLOSE - piuBasso) / (piuAlto - piuBasso) * 100





RETURN oscillatore  coloured(51,51,255)as"sestetto",45coloured(255,0,0)as" short",55coloured(0,255,0)as" long",10coloured(255,0,0)as"se ritesta buy",90coloured(0,255,0)as"se ritesta short",triangularaverage[round(p*0.618)](oscillatore)coloured(255,0,0)as"trigg"

///////////////////////////////////////

///////stocsestettoevolume
///p=10
piuAlto = HIGHEST[p](HIGH)
piuBasso = LOWEST[p](LOW)
oscillatore = (CLOSE - piuBasso) / (piuAlto - piuBasso) * 100
///////////////////////////////////////////
hilo= volume/range
opeclo= close-open
a= (exponentialaverage[2](hilo*opeclo))
piuAlto = HIGHEST[p](a)
piuBasso = LOWEST[p](a)
verde = (a- piuBasso) / (piuAlto - piuBasso) * 100





RETURN oscillatore COLOURED(51,50,250) as "sestettoblu",45coloured(255,0,0)as" 45short",55coloured(0,255,0)as"55 long",10coloured(255,0,0)as"10se ritesta buy",90coloured(0,255,0)as"90se ritesta short",verde  COLOURED(0,102,0) as "verdesestettovolumeaggiungicolore"
///////////////////////////////////////
////stop  volatilita
//////moltiplier=da2,5  a4

rang6= (highest[6]((high)[1]))-(lowest[6]((low)[1]))
rang7= ((rang6+range)/7)*moltiplier
stopshort=(lowest[7](close))+rang7
stoplong=(highest[7](close))-rang7
///////////////////////////////////////////////////////////


return ExponentialAverage[7](stopshort)coloured(255,0,0) as"stopshortsemplice",ExponentialAverage[7](stoplong)coloured(0,255,0) as"stoplongsemplice"
//////////////////////////////////

///////volume.system.force.index
return exponentialaverage[13](forceindex(close)),0
////////////////////////
/////////volume a moneyflow

a=MoneyFlow[p](close)*average[p](volume/range)
aa=MoneyFlow[pp](close)*average[pp](volume/range)

return a coloured(250,170,0)as "moneicorto",aa coloured(100,200,150) as"moneilungo",0 as"zero"
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////volume.bost.rep.
/////////co=4
/////bostian
a=close+close-high-low
b=high-low
intens=a/b
bost=summation[co](intens)*volume
bostsu=0
if bost >0 then
    bostsu=bost
else
    bostsu=0
endif
bostgiu=0
if bost <0 then
    bostgiu=bost
else
    bostgiu=0
endif
lineabostsu=std [co*2] ( bostsu)
lineabostgiu=std [co*2] ( bostgiu)*-1
///////////////////////////////////////bostian///////////////
if bostsu>0 and bostsu>lineabostsu then
    signal=2
endif
if bostsu>0 and bostsu
    signal=1
endif
if bostgiu<0 and bostgiu
    signal=-2
endif
if bostgiu<0 and bostgiu>lineabostgiu then
    signal=-1
endif
////////////////////////////////////////////////////bostiansignal///////////////
///repulse/////////
rep=repulse[co](close)
repsu=0
if rep >0 then
    repsu=rep
else
    repsu=0
endif
repgiu=0
if rep  <0 then
    repgiu=rep
else
    repgiu=0
endif
linearepsu=std [co*2] (repsu)
linearepgiu=std [co*2] ( repgiu)*-1
///////////////////////////////////////////////////////repulse repnal/////
if repsu>0 and bostsu>linearepsu then
    repnal=2
endif
if repsu>0 and bostsu
    repnal=1
endif
if repgiu<0 and bostgiu
    repnal=-2
endif
if repgiu<0 and bostgiu>linearepgiu then
    repnal=-1
endif
/////////////////////////////////repulse repnal
////volume a punti
hilo= volume/range
opeclo= close-open
a= (exponentialaverage[co](hilo*opeclo))
baseper=(signal+repnal)
///////////////////////

repulsignal=(exponentialaverage[co*2](repulse[co](close)))*2
if repulsignal>6 then
    repulsignal=6
endif
if repulsignal<-6 then
    repulsignal=-6
endif
return baseper COLOURED(51,0,0) as "lineamarrone.repulse.bostian",0.5COLOURED(0,255,0)as"limitsopra0",-0.5COLOURED(255,0,0)as"limitsotto0",repulsignal coloured(255,0,0)as"linearossa media doppia del repulse",0coloured(0,0,255)as"equilibrio",4coloured(51,0,0)as"4",-4coloured(51,0,0)as"-4"
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////stop.trendlinea
c1=high>high[1]
c2=high>high[2]
c3=high>high[3]
c4=high>high[4]
var1=low
var2=low
var3=low
var4=low
if c1 and c2 and c3 and c4 then
    trendlong=1
    trendshort=0
endif
if var1 and var2 and var3 and var4 then
    trendlong=0
    trendshort=-1
endif
if trendshort=-1 then
    if low
        linea=low
    else
        linea=linea[1]
    endif
endif
if trendlong=1 then
    if high>linea then
        linea=high
    else
        linea=linea[1]
    endif
endif

return linea
//////////////////////////////////////////////////////////////////////////

///////////////Trend Index
////y=20
//ONCE y = 20 // This value is also the horizon of time over which the prediction is made.  The larger y is, the larger the timeperiod over which we can interpret the indicatorIf there is a low trend index, there are too many reversals, or the price is stagnanting, so the price is not trendy.

Useful Applications :
High values of the trend index can be used to validate signals given by particular indicaters which are only valid in treding periods and not in trading ranges..
ONCE upTrend = 0
ONCE downTrend = 0
ONCE countHighs = 0
downTrendLength = 0
upTrendLength = 0
countUpTrends = 0 // Number of consecutive increasing bars
countDownTrends = 0 // Number of consecutive decreasing bars
countLows = 0
IF BarIndex > y+4 THEN
    FOR x=0 TO y
        IF Close[x]>Max(High[x+1],Min(High[x+2],Min(High[x+3],High[x+4]))) THEN
            countHighs = countHighs + 1
            upTrend = 1
        ELSE
            IF upTrend THEN
                upTrendLength = countHighs + upTrendLength
                countUpTrends = countUpTrends + 1
                countHighs = 0
                upTrend = 0
            ENDIF
        ENDIF
       
        IF Close[x]
            countLows = countLows + 1
            downTrend = 1
        ELSE
            IF downTrend THEN
                downTrendLength = countLows + downTrendLength
                countDownTrends = countDownTrends + 1
                countLows = 0
                downTrend = 0
            ENDIF
        ENDIF
    NEXT
   
    upTrendAvgLength = upTrendLength/countUpTrends // Average length of bullish trends
    downTrendAvgLength = downTrendLength/countDownTrends // Average length of bearish trends
    trendsAvgLength = (upTrendAvgLength+downTrendAvgLength)/2 // Average length of trending periods.
    trendingIndex = 1-(countDownTrends + countUpTrends)/y // Number of bullish and bearish trends.  The less there are in relation to the number of bars, the more trendy the value is aand the higher TrendingBars will be.
ELSE
    trendingIndex = undefined
    trendsAvgLength = undefined
ENDIF
IF BarIndex > 2*y THEN
    trendingIndexMMy = Average[y](trendingIndex)
ELSE
    trendingIndexMMy = undefined
ENDIF
IF trendsAvgLength THEN
ENDIF
RETURN trendingIndex COLOURED(255,0,0) AS "Trending index", trendingIndexMMy COLOURED(255,128,0) AS "Trending index MA(y)" //, trendsAvgLength AS "Trends average length"
//////////////////////////////////////////////////

/////////TrailingStop
//////p=10
// ---- script begin ----
//
// TrailingStop%
// JWK, 20091016

perc = p // input Trailing Loss % - median term: 5 - 10
longloss = high*perc/100
shortloss = low*perc/100

If high < shorttrail[1] and direction[1] = -1 then // staying short
    shorttrail = Min(shorttrail[1],low + shortloss)
    longtrail = Min(longtrail[1],high - longloss)
    plot = shorttrail
    direction = -1
elsif high > shorttrail[1] and direction[1] = -1 then // short stopped out, going long
    shorttrail = Max(shorttrail[1], low + shortloss)
    longtrail = high - longloss
    plot = longtrail
    direction = 1
elsif low > longtrail[1] and direction[1] = 1 then // staying long
    longtrail = Max(longtrail[1],high - longloss)
    shorttrail = Max(shorttrail[1], low + shortloss)
    plot = longtrail
    direction = 1
elsif low < longtrail[1] and direction[1] = 1 then // long stopped out, going short
    longtrail = Min(longtrail[1],high - longloss)
    shorttrail = low + shortloss
    plot = shorttrail
    direction = -1
else
    shorttrail = low + shortloss
    longtrail = high - longloss
    plot = longtrail
    direction = 1
endif

return plot AS "TrailStop%"

// ---- script end ----////////////////////////////////////////

////////////volumi.pos.e.neg.
////m=5
volpos=0
volneg=0
for n=m downto 1
   
    if close[n-1]=>open[n-1] then
        volpos=volpos+volume[n-1]
    elsif close[n-1]
        volneg=volneg-volume[n-1]
    endif
next
return volpos coloured(0,255,0) as "VOLUMI POSITIVI", volneg coloured(255,0,0) AS "VOLUMI NEGATIVI",0 as"zero",tema[m](volpos+volneg)as " trigger"

///////////////////////////////////////////////////////////////

////////////volume per punticum
a=volume/range
b=abs(open-close)
indi= a*b
if open
    volpi=indi*1
else
    volpi=indi*-1
endif

return cumsum(volpi)
////////////////////////////////////////////////////////////////////////////////////




 

10/01/11

Intermarket

Il modello intermarket descritto da Martin Pring cerca di classificare il ciclo economico in più fasi, ognuna caratterizzata da una precisa impostazione, rialzista o ribassista, del mercato obbligazionario, azionario e delle materie prime. Si può trarre beneficio da questa classificazione, modificando nelle diverse fasi l’asset allocation dei propri investimenti.
La fase 1, “ inizio contrazione economica”
sale mercato obbligazionario
diminuisce la pressione inflazionistica
scende l’azionario
scende le materie prime.
La fase 2 “di massima intensità della recessione economica”
sale mercato obbligazionario
diminuisce la pressione inflazionistica
sale l’azionario
scende le materie prime.
La fase 3 “di inizio della ripresa economica”
sale mercato obbligazionario
diminuisce la pressione inflazionistica
sale l’azionario
sale le materie prime.
La fase 4 “di espansione economica”,
scende mercato obbligazionario
aumenta la pressione inflazionistica
sale l’azionario
sale le materie prime.
La fase 5 “di massima intensità dell’espansione economica”
scende mercato obbligazionario
aumenta la pressione inflazionistica
scende l’azionario
sale le materie prime.
La fase 6 “di rallentamento della crescita economica”
scende mercato obbligazionario
aumenta la pressione inflazionistica
scende l’azionario
scende le materie prime.
evidenzia un orientamento al ribasso di tutti e tre i mercati.
www.finanza.com
info.gif (242 byte)