# Multiple moving averages of the Fish

#### asianboy

##### New member

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];

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.

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

Last edited:

#### asianboy

##### New member
@diazlaz wow very nice chart you did upgrade. can you shared the chart ?

#### diazlaz

##### Well-known member
2019 Donor
VIP
will do as soon as i'm done will share the revised version. in the meantime look at this one.

#### 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.

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.

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

#### imnobody

##### Member
@diazlaz what is the bottom study called? Do you have the script for it?
I'm really intrigued too, if it's prop I understand but even as so if I could get some parameters to try and build one myself that'd be awesome.