Forex Factory
  • Login

  • Username: Password:
  • 5:11am

  • Search
  • Home

  • Forums

  • Trades

  • Calendar

  • News

  • Market

  • Brokers

Options

Search
Search
Search

Subscribe to Thread

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

Need a EMA based Bollinger Band Indicator 3 replies

Boilinger band without midle band to complete my system 5 replies

Di Napoli, RSI, EMA 5 min system 14 replies

ema bollinger band alerts 1 reply

5 min 3 ema crosses 70 replies

  • Trading Systems
  • /
  • Reply to Thread
  • 9

5 min 13 EMA band System

  • Last Post
  • First Unread
  •  
  • Page 1 2
  •  
  • Post# 1
  • Quote
  • First Post: Mar 27, 2007 8:32am
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
About six months ago I did this indicator with EA and tested it on only one months data ended with a 6 profit factor with settings of 20,6,6,4,-12
It works well in ranging markets in different pairs and time frames but the 5 minute cable is the best. Seems like the settings still work quite well but should be backtested again. When the market isnt in a strong trend It works uncannily well for having tested it only one months data and still works pretty well six months later in ranging markets but have not had time to find the proper filter to weed out the bad setups. Its simple strategy. The candle sticks on the 13 ema band of a 13 ema at the same time as a cross of the cci then moves down 10-20 pips then often times triggers again right after the trade is finished to the opposite of the bands ive seen this happen back to back many times sometimes four or five times in a row. Not sure its still that good. Take a look tell me what you think its worthy. Thanks alot
Attached Files
File Type: mq4 eEmaCci24.mq4   34 KB | 1,026 download
File Type: mq4 iEmaCci22.mq4   5 KB | 754 downloads
Ed
  • Post# 2
  • Quote
  • Mar 27, 2007 8:48am
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
Sorry I meant to say that after backtesting the strategy was for the candle to close on the 6 band of the 20 ema..and the cross over of the cci settings 4,-12
Ed
  • Post# 3
  • Quote
  • Mar 27, 2007 9:05am
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
sorry I meant to say that the strategy after optimizing was for the candle to close on the 6 band 20 ema I don't know what makes it work but found that it works sometimes when there is 5 minute divergence and very much so when there is a quick move against a strong 60 minute trend in the opposite direction and like i said in just sideways markets or when there is movement before a breakout
Ed
  • Post# 4
  • Quote
  • Mar 27, 2007 2:55pm
  • lcfxtrader
    Commercial Member | 410 Posts | Joined Jan 2007
Can you post some charts?
  • Post# 5
  • Quote
  • Mar 27, 2007 4:49pm
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
These were recent winners, it still works after 6 months tested only one months data at the time but it doesnt happen as often now so maybe it should be reoptimized plus the markets don't act the same as before for the cable. Anyway The indicator will trigger when the bar touches the band at the same time as it crosses the cci but the indicator sticks on the close. IT would be interesting to see how it performs when it just touches the band on the cci cross and the bar doesnt have to close on the band to validate the strategy. And see how many of those setups pan out. WIth the right filters perhaps crossing of the bands dont have to be in exact alignment but the cci cross is what is key here I think so
Ed
  • Post# 6
  • Quote
  • Mar 27, 2007 4:53pm
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
Sorry the files were to big for the last post so Ive only included one here
Attached Image
Ed
  • Post# 7
  • Quote
  • Mar 27, 2007 4:57pm
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
You can see two other instances on the previous chart where the cci crossed but the candle wick didnt quite touch the bands at the same time.. missed by a hair and they were winners too! But I didnt mark them. thats over 100 pips in a couple of hours of day trading?
Ed
  • Post# 8
  • Quote
  • Mar 27, 2007 8:27pm
  • carmel
    Joined Mar 2005 | 222 Posts | Status: Member
Quoting tjames35
About six months ago I did this indicator with EA and tested it on only one months data ended with a 6 profit factor with settings of 20,6,6,4,-12
It works well in ranging markets in different pairs and time frames but the 5 minute cable is the best. Seems like the settings still work quite well but should be backtested again. When the market isnt in a strong trend It works uncannily well for having tested it only one months data and still works pretty well six months later in ranging markets but have not had time to find the proper filter to weed out the bad setups. Its simple strategy. The candle sticks on the 13 ema band of a 13 ema at the same time as a cross of the cci then moves down 10-20 pips then often times triggers again right after the trade is finished to the opposite of the bands ive seen this happen back to back many times sometimes four or five times in a row. Not sure its still that good. Take a look tell me what you think its worthy. Thanks alot
Thanks for sharing. Do you intend to tune it up a bit?
"Loss and failure are inevitable but misery is optional"
  • Post# 9
  • Quote
  • Mar 27, 2007 8:36pm
  • carmel
    Joined Mar 2005 | 222 Posts | Status: Member
For some reason these won't open for me. Any hints?
"Loss and failure are inevitable but misery is optional"
  • Post# 10
  • Quote
  • Mar 28, 2007 2:02am
  • forig
    Joined May 2006 | 33 Posts | Status: Member
Quoting carmel
For some reason these won't open for me. Any hints?
The same for me. The EA writes: 2007.03.27 20:51:032007.01.05 15:10 Cannot open file 'C:\Program Files\MetaTrader 4\experts\indicators\iEmaCci2.ex4' on the GBPUSD,M5
  • Post# 11
  • Quote
  • Mar 28, 2007 2:21am
  • WHTenn
    Joined Nov 2006 | 1,732 Posts | Status: Member
This looks very interesting and I hope it continues to be very profitible for you.
  • Post# 12
  • Quote
  • Mar 28, 2007 4:30am
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
I havent any idea why they wont open. a little bit later i will upload under a different file name. For now I wanted to say it works well identifying a 1-2-3 strategy where price trades through the band and cci once then retraces back and triggers again with the cci cross on the underside then go same direction as the two triggers..
Ed
  • Post# 13
  • Quote
  • Mar 28, 2007 4:49am
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
I dont remember how I backtested to find those results but I did do a backtest on the one minute which was very reliable as well and this could have been taken from that but my one minute had different settings so maybe I did more then one backtest..try your own backtest on more data maybe you can get even better results but what i would really like is an indicator whose arrows stick when the bar touches the bands same time the cci crosses and not have the criteria that the bar closes on it.. then we can visually see how effective it can be without the close. this the main reason why i havent traded it cuz too many setups too identify and track of
Attached Files
File Type: mq4 eEmaCci2.mq4   33 KB | 417 downloads
File Type: mq4 iEmaCci2.mq4   5 KB | 354 downloads
Ed
  • Post# 14
  • Quote
  • Mar 28, 2007 4:22pm
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
extern int EMA_Period=13;
extern int EMA_Band=13;
extern int CCI_Period=14;
extern double CCI_UpLevel=40;
extern double CCI_DnLevel=-40;
extern bool UseAlert=true;
extern bool SendEmail=false;
extern int Repeat=3;
extern int Periods=5;
int Crepeat=0;
int AlertTime=0;
int Bar=0;

int DotPip=7;

//---- buffers


double BuyBuffer[];
double SellBuffer[];

double CciCurrent=0, CciPrevious=0;
double EmaCurrent=0;
double EmaUpBand=0;
double EmaDnBand=0;
double LastState[];



//+------------------------------------ ------------------------------+
//| Custom indicator initialization function |
//+------------------------------------ ------------------------------+
int init()
{
Crepeat=Repeat;
IndicatorBuffers(3);
//---- indicators
SetIndexStyle(0,DRAW_ARROW,EMPTY);
SetIndexArrow(0,233);
SetIndexBuffer(0, BuyBuffer);

SetIndexStyle(1,DRAW_ARROW,EMPTY);
SetIndexArrow(1,234);
SetIndexBuffer(1, SellBuffer);
//----
return(0);
}
//+------------------------------------ ------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------ ------------------------------+
int deinit()
{
//---- TODO: add your code here
RefreshRates();
//----
return(0);
}
//+------------------------------------ ------------------------------+
//| Custom indicator iteration function |
//+------------------------------------ ------------------------------+
int start()
{

int limit;
int counted_bars=IndicatorCounted();
if (counted_bars<0) return (-1);
if (counted_bars>0) counted_bars--;
limit=(Bars-counted_bars)-1;

LastState[0]=0;

for(int i=limit; i>=0; i--) {
CciCurrent=iCCI(NULL,0,CCI_Period,P RICE_TYPICAL,i);
CciPrevious=iCCI(NULL,0,CCI_Period, PRICE_TYPICAL,(i+1));
EmaCurrent=iMA(NULL,0,EMA_Period,0, MODE_EMA,PRICE_CLOSE,i);
EmaUpBand=EmaCurrent+EMA_Band*Point ;
EmaDnBand=EmaCurrent-EMA_Band*Point;
if (High[i]>=EmaDnBand && Low[i]<=EmaDnBand && CciCurrent>CCI_DnLevel && CciCurrent<CCI_UpLevel) {
BuyBuffer[i]=Low[i]-DotPip*Point;
LastState[0]=1;
}
else {
BuyBuffer[i]=0;
}

if (High[i]>=EmaUpBand && Low[i]<=EmaUpBand && CciCurrent>CCI_DnLevel && CciCurrent<CCI_UpLevel) {
SellBuffer[i]=High[i]+DotPip*Point;
LastState[0]=-1;
}
else {
SellBuffer[i]=0;
}

}


if (SellBuffer[Bar]>0) Alerts(0,1,0,0);
else if (BuyBuffer[Bar]>0) Alerts(1,0,0,0);
else Alerts(0,0,0,0);


//----
return(0);
}

void Alerts(int _buy, int _sell, int _exitbuy, int _exitsell) {
string AlertStr="";
AlertStr="";
string CurDate="";
CurDate=TimeToStr(CurTime(),TIME_DA TE|TIME_MINUTES);
//Alert system
if (UseAlert)
{

if (_buy==1)
{
if (Crepeat==Repeat)
{
AlertTime=0;
}
if (Crepeat>0 && (CurTime()-AlertTime)>Periods)
{
if (_buy==1) {
AlertStr=AlertStr+"Attention! EmaCci Buy Signal"+" Ask="+DoubleToStr(Ask,Digits)+" at "+CurDate;
Alert(Symbol()," ",Period(), ": ",AlertStr);
if (SendEmail)
{
SendMail(Symbol()+" "+Period()+ ": ",Symbol()+" "+Period()+": "+AlertStr);
}


Crepeat=Crepeat-1;
AlertTime=CurTime();
}

}
}

if (_sell==1)
{
if (Crepeat==Repeat)
{
AlertTime=0;
}
if (Crepeat>0 && (CurTime()-AlertTime)>Periods)
{
if (_sell==1) {
AlertStr=AlertStr+"Attention! EmaCci Sell Signal "+" Bid="+DoubleToStr(Bid,Digits)+" at "+CurDate;
Alert(Symbol()," ",Period(), ": ",AlertStr);
if (SendEmail)
{
SendMail(Symbol()+" "+Period()+ ": ",Symbol()+" "+Period()+": "+AlertStr);
}


Crepeat=Crepeat-1;
AlertTime=CurTime();
}

}
}

if (_exitsell==1)
{
if (Crepeat==Repeat)
{
AlertTime=0;
}

if (Crepeat>0 && (CurTime()-AlertTime)>Periods)
{
if (_exitsell==1) {
AlertStr=AlertStr+"Attention! Please check to close sell; ";
Alert(Symbol()," ",Period(), ": ", AlertStr);
if (SendEmail)
{
SendMail(Symbol()+" "+Period()+ ": ",Symbol()+" "+Period()+": "+AlertStr);
}


Crepeat=Crepeat-1;
AlertTime=CurTime();
}

}

}


if (_exitbuy==1)
{
if (Crepeat==Repeat)
{
AlertTime=0;
}
if (Crepeat>0 && (CurTime()-AlertTime)>Periods)
{
if (_exitbuy==1) {
AlertStr=AlertStr+"Attention! Please check to close buy; ";
Alert(Symbol()," ",Period(), ": ",AlertStr);
if (SendEmail)
{
SendMail(Symbol()+" "+Period()+ ": ",Symbol()+" "+Period()+": "+AlertStr);
}


Crepeat=Crepeat-1;
AlertTime=CurTime();
}

}
}

if (_exitbuy==0 && _exitsell==0 && _buy==0 && _sell==0)
{
Crepeat=Repeat;
AlertTime=0;
}

}
//



//----
return;
}
Ed
  • Post# 15
  • Quote
  • Mar 28, 2007 5:06pm
  • carmel
    Joined Mar 2005 | 222 Posts | Status: Member
Can anyone tell us how to use the code just posted? Thanks.
"Loss and failure are inevitable but misery is optional"
  • Post# 16
  • Quote
  • Mar 28, 2007 5:13pm
  • mart-hart
    Joined Oct 2004 | 302 Posts | Status: Member
Code made up as an indicator

Mart
Attached File
File Type: mq4 EMA13.mq4   5 KB | 337 downloads
----o00o--°(_)°--o00o----
  • Post# 17
  • Quote
  • Mar 28, 2007 5:30pm
  • carmel
    Joined Mar 2005 | 222 Posts | Status: Member
Thanks for your efforts. All I get, tho, is a screen with a few arrows on it' nothing like what was shown on post #6. Any further help will be greatly appreciated as I think this strategy could be very helpful in a ranging market.

Quoting mart-hart
Code made up as an indicator

Mart
"Loss and failure are inevitable but misery is optional"
  • Post# 18
  • Quote
  • Mar 28, 2007 7:51pm
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
click on metaeditor inside metatrader then click on file, custom indicator, give it a name, then choose indicator in a separate window. copy and paste the code then click on COMPILE then close editor, close metatrader then reopen metatrader and install indicator
Ed
  • Post# 19
  • Quote
  • Mar 28, 2007 7:53pm
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
mart hart thank you! i was wondering if you can make it so when cci crosses the band it triggers and arrow sticks without the candle having to rest on the band at the close of the bar?
Ed
  • Post# 20
  • Quote
  • Mar 28, 2007 8:01pm
  • tjames35
    Joined Feb 2007 | 22 Posts | Status: Member
Carmel you have to add the cci indicator and the ema bands separately on the chart then you will see if the arrows line up with the settings. make the settings 20 ema 6 bands 6 period cci with levels 4,-12. I have not checked yet if the new indicator is the same or not..ill let you know if it isnt
Ed
Thread Tools Search this Thread
Show Printable Version Show Printable Version
Email This Thread Email This Thread
Search this Thread:

Advanced Search

  • Trading Systems
  • /
  • 5 min 13 EMA band System
  • Reply to Thread
    • Page 1 2
0 traders viewing now
  • More

©2013 Forex Factory, Inc. / Terms of Use / Privacy Policy

Forex Factory® is a registered trademark.

Connect

  • Facebook
  • Twitter
  • RSS

Company

  • About FF
  • FF Blog
  • Careers at FF
  • Advertising
  • Contact FF

Products

  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer

Website

  • Homepage
  • Search
  • User Guide
  • Member List
  • Online Now
  • Report a Bug