Here’s a reader request for an upper study that plots Fisher Transform signals on the price bars.
# FisherTransformSignals # http://www.thinkscripter.com # thinkscripter@gmail.com # Last Update 20 June 2010 input signalOffsetFactor = 0.20; input length = 10; input threshold = 2.0; def signalOffset = AvgTrueRange(high,close,low,10)*signalOffsetFactor; def maxHigh = Highest(high, length); def minLow = Lowest(low, length); rec value = if maxHigh - minLow == 0 then 0 else 0.66 * ((close - minLow) / (maxHigh - minLow) - 0.5) + 0.67 * value[1]; def truncValue = if value > 0.99 then 0.999 else if value < -0.99 then -0.999 else value; rec FT = 0.5 * (log((1 + truncValue) / (1 - truncValue)) + FT[1]); def trendDown = if FT < FT[1] and FT[1] > FT[2] and FT[1] >= threshold then 1 else 0; def trendUp = if FT > FT[1] and FT[1] < FT[2] and FT[1] <= -threshold then 1 else 0; def cSignal = if trendUp then low-signalOffset else if trendDown then high+signalOffset else double.nan; plot signalHighlight = cSignal; signalHighlight.AssignValueColor(if trendUp then color.green else color.red); signalHighlight.setLineWeight(1); signalHighlight.setStyle(curve.points); signalHighlight.setpaintingStrategy(paintingStrategy.LINE_VS_TRIANGLES); plot signal = cSignal; signal.setDefaultColor(color.white); signal.setLineWeight(4); signal.setStyle(curve.points); signal.setpaintingStrategy(paintingStrategy.LINE_VS_SQUARES); #alert(trendup or trendDown, if trendUp then "Long" else "Short", Alert.bar, sound.bell);




Long live the Fish!! An already Great study mixed and refurbished by a great study creator equals Awesome!
Great Study, Eric and thanks..
You do not cease to amaze me, your charts are incredible!
Brad,
Thanks. Hold on to your hat because I have a few in the pipeline which are far more ambitious and have been in development for weeks. I won’t release them until I’m satisfied they meet my standards.
-TS
Brilliant! I have been using the Fish for several months and it’s the only lower-level indicator I have on my charts right now. This is a handy addition to my “toolkit” and I doff my hat in your honor for being a great TosScripter!!
Question – is there an easy condition in Thinkscript to only show Fish Signals above or below a certain threshold? IE, only show long/short if the cross occurs above or below +2/-2? IMHO that is where the Fish truly shines as a signal to exit or enter a trade as appropriate.
I’d think it’d be a simple IF-THEN condition in ThinkScript, but I’m still learning my way around it.
How easy is it to insert a sound alert each time a signal is given?
Very….You’ll need to use the alert() function. A great writeup on its use is on Prospectus’ site.
-Eric
Today 19.06.10 Thinkorsvim it was updated to version 1667 and green and red signals were gone – there were only white squares!!! Help to restore green and red Fish Signals!
Yes…I see. Fix forthcoming.
-Eric
20.06.10 Thinkorsvim it was updated to version 1668
could only make Fish Signals green and red circles with white squares
settings signalHidhlight
It’s not working for me as it did before the update. I don’t see the signal at all. The last signal I am seeing is on Thursday’s chart and nothing after that…
Strange. Did anyone have the same issue?
Thanks.
Joe,
Please note that the new version also includes a filter to hide Fisher crosses below a certain threshold. It is defaulted to 2.0. To see all the signals, change your threshold value back to 0.
Eric
I found one error when using this code. In the line that begins “def trendDown = if FTFT[2]” , FTFT should have a “<" between them so as to read FT < FT. Otherwise works fine. Thanks.
Yep…Wordpress ate a < sign. It’s been fixed. Thank you,
Eric
def trendDown = if FTFT[2] and FT[1]>=threshold then 1 else 0;
error in the formula – a sign put FT FT [2]?
Yes – WordPress loves to eat greater than and less than signs! The code has been fixed. Thank you,
Eric
changes in the code the new version – which is better
ver1.was
def trendDown = if FT=threshold then 1 else 0;
def trendUp = if FT>FT[1] and FT[1]<= -threshold then 1 else 0;
ver2.now
def trendDown = if FTFT[2] and FT[1]>=threshold then 1 else 0;
def trendUp = if FT>FT[1] and FT[1]<FT[2] and FT[1]<= -threshold then 1 else 0;
for 5min and the significance threshold =(-2) ver. 1 shows better ….
sorry ..Wordpress correctly pointed def trendDown