Multiple moving averages of the Fish

asianboy

New member
2010-01-07_1853.png


from http://share-tos.blogspot.com/2010/01/multiple-moving-averages-of-fish.html

Code:
# Multiple moving averages of the Fish

#by Wavetrader » Mon Oct 26, 2009 8:53 pm

#

#



declare lower;


input length = 10;


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 fish = 0.5 * (log((1 + truncValue) / (1 - truncValue)) + fish[1]); plot FTOneBarBack = fish[1]; FTOneBarBack.SetDefaultColor(GetColor(1)); plot FT = fish; FT.SetDefaultColor(GetColor(8)); plot ZeroLine = 0; ZeroLine.SetDefaultColor(GetColor(3)); plot SMA = simpleMovingAvg(ft, 1); plot SMA1 = simpleMovingAvg(ft, 5); plot SMA2 = simpleMovingAvg(ft, 10); plot SMA3 = simpleMovingAvg(ft, 15); plot SMA4 = simpleMovingAvg(ft, 20); plot SMA5 = simpleMovingAvg(ft, 30); plot SMA6 = simpleMovingAvg(ft, 40); plot SMA7 = simpleMovingAvg(ft, 7); plot SMA8 = simpleMovingAvg(ft, 3); plot SMA9 = simpleMovingAvg(ft, 25); plot SMA10 = simpleMovingAvg(ft, 50); plot SMA11 = simpleMovingAvg(ft, 35); plot SMA12 = simpleMovingAvg(ft, 7); plot SMA13 = simpleMovingAvg(ft, 45); plot SMA14 = simpleMovingAvg(ft, 17); AddCloud(sma, sma10); AddCloud(sma, sma6); AddCloud(sma, sma3); AddCloud(sma, sma1); AddCloud(sma, sma2); AddCloud(sma, sma4); AddCloud(sma, sma5); AddCloud(sma, sma7); AddCloud(sma, sma9); AddCloud(sma, sma11); AddCloud(sma, sma12); AddCloud(sma, sma13); AddCloud(sma, sma14); SMA.AssignValueColor(if ft > SMA[1] then color.green else color.red);

SMA1.AssignValueColor(if ft > SMA1[1] then color.green else color.red);

SMA2.AssignValueColor(if ft > SMA2[1] then color.green else color.red);

SMA3.AssignValueColor(if ft > SMA3[1] then color.green else color.red);

SMA4.AssignValueColor(if ft > SMA4[1] then color.green else color.red);

SMA5.AssignValueColor(if ft > SMA5[1] then color.green else color.red);

SMA6.AssignValueColor(if ft > SMA6[1] then color.green else color.red);

SMA7.AssignValueColor(if ft > SMA7[1] then color.green else color.red);

SMA8.AssignValueColor(if ft > SMA8[1] then color.green else color.red);

SMA9.AssignValueColor(if ft > SMA9[1] then color.green else color.red);

SMA10.AssignValueColor(if ft > SMA10[1] then color.green else color.red);

SMA11.AssignValueColor(if ft > SMA11[1] then color.green else color.red);

SMA12.AssignValueColor(if ft > SMA12[1] then color.green else color.red);

SMA13.AssignValueColor(if ft > SMA13[1] then color.green else color.red);

SMA14.AssignValueColor(if ft > SMA14[1] then color.green else color.red);
 

diazlaz

Well-known member
2019 Donor
VIP
thanks for sharing I think some of the logic from the ribbon can be turned into an exit/stop indicator - I need to isolate the logic and think can turn this into stop indicator to get out of an existing trade to lock profit. look at the line when it hits the bottom, seems like a good time to exit a trade.

KMxZWXX.png


Stop signal is generated when line cross zeroline (red line).
 
Last edited:

imnobody

Member
thanks for sharing I think some of the logic from the ribbon can be turned into an exit/stop indicator - I need to isolate the logic and think can turn this into stop indicator to get out of an existing trade to lock profit. look at the line when it hits the bottom, seems like a good time to exit a trade.

KMxZWXX.png


Stop signal is generated when line cross zeroline (red line).
that observation trend is something i'm really interested in is there anywhere i can find something like this? thanks
 

diazlaz

Well-known member
2019 Donor
VIP
that observation trend is something i'm really interested in is there anywhere i can find something like this? thanks
welcome to the community! - let me provide you a few links to help you get started. there are many trend following indicators here, from ma's to a number of published indicators.

please look at link1 link2 link3 also please share the type of trader that you are, and the types of position you take, this will help refine the feedback.
 

imnobody

Member
welcome to the community! - let me provide you a few links to help you get started. there are many trend following indicators here, from ma's to a number of published indicators.

please look at link1 link2 link3 also please share the type of trader that you are, and the types of position you take, this will help refine the feedback.
not sure that's what i'm looking for i think you thought i was talking about the top part but i meant the bottom posted picture you see the trend indicator you have on the bottom observation trend, that's what i'm trying to work on, just something simple like this but I can't get it right.
 

HighBredCloud

Well-known member
VIP
thanks for sharing I think some of the logic from the ribbon can be turned into an exit/stop indicator - I need to isolate the logic and think can turn this into stop indicator to get out of an existing trade to lock profit. look at the line when it hits the bottom, seems like a good time to exit a trade.

KMxZWXX.png


Stop signal is generated when line cross zeroline (red line).
@diazlaz what is the bottom study called? Do you have the script for it?
 

Similar threads

Top