## Prevailing Trend

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

### Prevailing Trend

Up
moving average of UP candles for n periods

Down
moving average of DOWN candles for n periods

Trend.lua

Tick Trend.lua

Apprentice
FXCodeBase: Confirmed User

Posts: 21099
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Prevailing Trend

To verify, these are the moving averages of the SIZE of up/down candles and do not use price in the equation?

Also, with the same formula, can you create this MVA of all candles?
Basically, the same formula without the split.

Thanks alot!

Apprentice wrote:
Trend.png

Up
moving average of UP candles for n periods

Down
moving average of DOWN candles for n periods
Trend.lua
speakinmymind

Posts: 310
Joined: Thu Feb 28, 2013 8:18 am

### Re: Prevailing Trend

1. Candle Size is used.
2. Use greater period.

Apprentice
FXCodeBase: Confirmed User

Posts: 21099
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Prevailing Trend

Great!

Can you please create a strategy that executes upon cross.

Thanks alot!!
speakinmymind

Posts: 310
Joined: Thu Feb 28, 2013 8:18 am

### Re: Prevailing Trend

Apprentice
FXCodeBase: Confirmed User

Posts: 21099
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Prevailing Trend

Requested can be found here.
viewtopic.php?f=31&t=59426&p=89256#p89256

Apprentice
FXCodeBase: Confirmed User

Posts: 21099
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Prevailing Trend

MQL4 version of Prevailing Trend oscillator: viewtopic.php?f=38&t=59601.
Alexander.Gettinger
FXCodeBase: Confirmed User

Posts: 3759
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

### Re: Prevailing Trend

Hi,
What difference with
Drive

http://fxcodebase.com/code/viewtopic.php?f=17&t=54880&p=89013&hilit=drive#p89013
The Drive has same algoritm,
evgeniyn

Posts: 44
Joined: Fri Dec 28, 2012 1:27 am

### Re: Prevailing Trend

Could you please add the same difference output as you updated in the split moving average indicator? Thanks!

viewtopic.php?f=17&t=59276&start=10
speakinmymind

Posts: 310
Joined: Thu Feb 28, 2013 8:18 am

### Re: Prevailing Trend

Apprentice
FXCodeBase: Confirmed User

Posts: 21099
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Next