StockFetcher Forums · View by Author: bramdc (6 messages) ·  [ Display By: Date / Subject ]<< >> 
Filter Exchange · TAT indicator
bramdc
msg #114904
8/16/2013 1:56:57 AM

Dear all,

I came across an interesting indicator, namely the 'TAT' indicator, combining MACD and parabolic SAR,

anyone having good skills to translate this to stockfetcher?

I have pasted the code here below:

thanks!

-------------------------------------------
indicator TAT;
input
macd_fast_period = 12,
macd_slow_period = 26,
macd_signal_period = 9,
sar_step = 0.02,
sar_maximum = 0.2,
tat_macd_multiplier = 66.67,
tat_sar_multiplier = 6.67,
tat_signal_period = 12,
overbought_level = 1,
oversold_level = -1;
draw
tat_main("TAT", solid_line, green),
tat_sig("TAT Signal", solid_line, red),
ob("Overbought level", dash_line, white),
os("Oversold level", dash_line, white),
zero("Zero", dash_line, white);
vars
islong(bool),
af(number),
extreme(number),
s(number),
sar(series),
i(number),
macd_main(series),
macd_sig(series),
tat_sar(number),
tat_macd(number);

begin
if macd_fast_period < 1 or macd_slow_period < 1 or macd_signal_period < 1 or tat_signal_period < 1 or back(close) < front(close) then
return;

macd_main := ema(close, macd_fast_period) - ema(close, macd_slow_period);
macd_sig := ema(macd_main, macd_signal_period);

islong := true;
af := sar_step;
extreme := high[front(close)];
s := low[front(close)];
sar[front(close)] := s;
for i := front(close) + 1 to back(close) do begin
s := s + af * (extreme - s);
if islong then
if low[i] < s then begin
islong := false;
af := sar_step;
s := extreme;
extreme := low[i];
end else begin
if extreme < high[i] then begin
extreme := high[i];
af := af + sar_step;
if af > sar_maximum then
af := sar_maximum;
end;
end
else
if high[i] > s then begin
islong := true;
af := sar_step;
s := extreme;
extreme := high[i];
end else begin
if extreme > low[i] then begin
extreme := low[i];
af := af + sar_step;
if af > sar_maximum then
af := sar_maximum;
end;
end;
sar[i] := s;
end;

for i := front(close) to back(close) do begin
tat_sar := 0;
tat_macd := 0;
if sar[i] <> 0 then
tat_sar := (close[i] - sar[i]) / sar[i];
if close[i] <> 0 then
tat_macd := (macd_main[i] - macd_sig[i])/ close[i];
tat_main[i] := 50*(tat_sar*tat_sar_multiplier + tat_macd*tat_macd_multiplier);
zero[i] := 0;
ob[i] := overbought_level;
os[i] := oversold_level;
end;
tat_sig := ema(tat_main, tat_signal_period);
end.

Filter Exchange · TRADING DIVERGENCES ON THE S&P 500
bramdc
msg #108649
11/1/2012 4:00:44 PM

OK, that's a pity, but I do agree that more then one month is really a long time,
I'm having now call options for SPY, but even there I take options two months ahead, with an average time of being in the market for 7 days or so, you lose some money on time, but if the index is gaining on average 1%, this should be sufficient to make a decent profit,
Thanks Kevin for considering my question, best, Bram.

Filter Exchange · TRADING DIVERGENCES ON THE S&P 500
bramdc
msg #108642
11/1/2012 5:07:40 AM

Hi Kevin, I was wondering whether you found already the time to run divergences to create short positions instead of long, should be even more profitable as moves down can speed up fast,
best, bramdc.

Announcements · New Value: Shares Outstanding
bramdc
msg #108381
10/15/2012 3:25:25 PM

Any news on 'short interest' data?
Thanks, bramdc.

Filter Exchange · TRADING DIVERGENCES ON THE S&P 500
bramdc
msg #108348
10/11/2012 2:36:27 PM

Hi Kevin,

new here on SF, and especially interested in learning about pattern trading,
this filter seems to be interesting to build up positions for S&P500,

now what about the 'inverse' way, to build up short positions, are these filters easy to adapt to trigger short signals?

Best, bramdc.

Filter Exchange · Buying climaxes
bramdc
msg #108334
10/10/2012 2:38:18 PM

No idea,
but interesting filter,
is it actually possible to plot the number of shares on daily basis meeting your criteria of buying or selling climax,
does the graph somehow correspond to ups and downs in indices?

StockFetcher Forums ·  · << >>

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2018 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus