Averages Strategy

Strategies are published here.

Moderator: admin

Averages Strategy

Postby Apprentice » Thu Apr 07, 2011 5:37 am

Averages Strategy.png

The strategy supports two types of signals.
Slope-Change Trend
Cross - Price / MA Cross
Averages Strategy.lua
(19.65 KiB) Downloaded 2993 times


To work, you must install AVEREGES Indikcator.
viewtopic.php?f=17&t=2430

The Strategy was revised and updated on December 18, 2018.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Averages Strategy

Postby davetherave110179 » Fri Apr 15, 2011 5:03 am

Apprentice,

I would like to request that a 'HPF Smoothing' parameter be added to this great stratagy. I know that stratagies CANNOT add datasources, but they can use another indicator as a smoothing option should not be a problem. I hope. ;)

Nikolay is working on the 'AVERAGES (with HPF Smoothing)' indicator for me :D so with any luck, i'll have both the stratagy and indicator fairly soon.

Many thanks and Happy Easter to everyone!
davetherave110179 :D :lol:
davetherave110179
 
Posts: 50
Joined: Wed Feb 09, 2011 6:09 am

Re: Averages Strategy

Postby Apprentice » Fri Apr 15, 2011 6:36 am

When and if, Nikolay complete its work only then can rewrite strategy.
The reason, Averages indicator is used by the strategy.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Averages Strategy

Postby PipGrabber » Wed Sep 28, 2011 11:31 am

Does this work? I did used the averages indicator then this strategy. It doesn't trade in backtesting even its set to. May it be slope or that MA/Cross. Equity remains flat,not trading.

Also, what's that "allow multiple" parameter for? thanks :roll:
User avatar
PipGrabber
 
Posts: 46
Joined: Fri Jan 21, 2011 9:22 am

Re: Averages Strategy

Postby Apprentice » Wed Sep 28, 2011 1:41 pm

First. Have you set Allow strategy to trade to Yes?
Second. If you set Allow Multiple to Yes.
Then you let strategy to open more than one position in the same direction.
This option is supported by a template that I use.
It is not always supported by stretegy algorithm.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Averages Strategy

Postby PipGrabber » Wed Sep 28, 2011 8:26 pm

Apprentice wrote:First. Have you set Allow strategy to trade to Yes?
Second. If you set Allow Multiple to Yes.
Then you let strategy to open more than one position in the same direction.
This option is supported by a template that I use.
It is not always supported by stretegy algorithm.


Hi Apprentice, yes I did. But the strategy is not trading. I downloaded the average indicator and strategy elsewhere. Maybe that's the reason, but I saw them on the customs folder already after it has been loaded. Its still not trading even if I remove and add up again the average strategy.

Ah ok. No, who wants multiple position on the same direction. Allow multiple is set to NO.
User avatar
PipGrabber
 
Posts: 46
Joined: Fri Jan 21, 2011 9:22 am

Re: Averages Strategy

Postby Supes05 » Wed Dec 28, 2011 4:43 am

Hi Apprentice. Love the Averages strategy! Is there any way to add a higher timeframe to work as a filter. Or maybe have the chart set on one timeframe, and the strategy set on a different. When the strategy tries to initiate a trade, it checks with the chart first? I have been doing this manually and have had great success. If I could just get it to trade that way automatically would be perfect. Hope this is do-able!
Supes05
 
Posts: 6
Joined: Thu May 05, 2011 3:44 am

Re: Averages Strategy

Postby Apprentice » Wed Dec 28, 2011 5:34 am

Basically, you need confirmation signals from the two time frames.
Up / Down Slope on Both or Cross in the same direction on both.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Averages Strategy

Postby kgsmith69 » Mon Jan 30, 2012 1:52 am

Can someone please explain this "[peroid]"

if indicator.DATA[period]> indicator.DATA[period-1] and indicator.DATA[period-2]> indicator.DATA[period-1]

Which one is the current bar, previous bar ...etc

Thanks
kgsmith
User avatar
kgsmith69
 
Posts: 24
Joined: Thu May 05, 2011 9:52 pm
Location: USA

Re: Averages Strategy

Postby Hug Coder » Mon Jan 30, 2012 6:54 am

period == current period (basically current candle) from the source that called ExUpdate function.

if indicator.DATA[period]> indicator.DATA[period-1] and indicator.DATA[period-2]> indicator.DATA[period-1]
==
if currentAverage > previousAverage and previouspreviousAverage > previousAverage.

What this means is basically that it looks for a reversal a reverse-"^" pattern in the average. A bull pattern.
Hug Coder
 
Posts: 38
Joined: Fri Jan 13, 2012 5:43 am

Next

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 26 guests