Forex
Google

Go Back   Forex Trading > Trading systems > Digital Filters
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-12-2005, 04:09 PM
hellkas hellkas is offline
Senior Member
 
Join Date: Oct 2005
Location: Porto/Portugal
Posts: 252
hellkas is on a distinguished road
Mandarine: original request and ideas

Hi all

Anyone could make this EA?


Err:= (tPrLong=0) or (tPrShort=0);
a:=0.8;
e1:=Mov(price,Periods,E);
e2:=Mov(e1,Periods,E);
e3:=Mov(e2,Periods,E);
e4:=Mov(e3,Periods,E);
e5:=Mov(e4,Periods,E);
e6:=Mov(e5,Periods,E);
c1:=-a*a*a;
c2:=3*a*a+3*a*a*a;
c3:=-6*a*a-3*a-3*a*a*a;
c4:=1+3*a+a*a*a+3*a*a;
T3MA:=c1*e6+c2*e5+c3*e4+c4*e3;

{Set Moving Averages}
MALong := Mov(Open,tPrLong,mtLong);
MAShort := Mov(Close,tPrShort,mtShort);

{Show Trend Up and Down}
UpTrend:=MAShort>MALong;
DownTrend:=MALong>MAShort;

{Declare variables}
flag1:= If(Prev>0,Prev,0);
shortflag1:= If(Prev>0,Prev,0);
LongPositionFlag:= If(Prev>0,Prev,0);
ShortPositionFlag:= If(Prev>0,Prev,0);

{Signal Long entry if fast MA crosses above slow MA by xamt}
Short:=Cross(MALong,MAShort)And MAShort<T3MA;

{Signal Short entry if fast MA crosses below slow MA by xamt}
Long:=Cross(MAShort,MALong)And MAShort>T3MA;

{Signal close of Long position if fast MA crosses below slow MA+yamt}
Shortstop:=Cross(MAShort,MALong);

{Signal close of short position if fast MA crosses above slow MA-yamt}
LongStop:=Cross(MALong,MAShort);

{Set flag to 1 if long signal detected and set to 0 if close of long position detected}
flag:= if(Long=1,1,
if(Longstop=1,0,prev));

{Set shortflag to 1 if short signal detected and set to 0 if close of short position detected}
Shortflag:= if(short=1,1,
if(ShortStop=1,0,prev));

{Enter long position on long signal only if long position not already open}
longenter:= if((ref(flag,-1)=0 And ref(flag1,-1)=0) And Long=1,1,0);


{Enter short position on short signal only if short position not already open}
Shortenter:= if(ref(Shortflag,-1)=0 And ref(shortflag1,-1)=0 And Short=1,1,0);

{Assume entry price is the closing price if position is entered}
Entryprice:= If(longenter =1,C,Prev);
EntryPriceShort:= If (shortenter=1,C,Prev);

{Set trailing stop TrailAmt below entry price for long position and adjust upwards if price moves up.}
TrailStop:= If (C>EntryPrice, max(C-TrailAmt,Prev),
If (C<EntryPrice, max(EntryPrice-TrailAmt,Prev),
If(C=EntryPrice And LongEnter =1,EntryPrice-TrailAmt,Prev)));

{Set trailStopShort TrailAmt above entry price for short position and adjust downwards if price moves down.}
TrailStopShort:= If (C<EntryPriceShort, min(C+TrailAmt,Prev),
If (C>EntryPriceShort, min(EntryPriceShort+TrailAmt,Prev),
If(C=EntryPriceShort And ShortEnter =1,EntryPriceShort+TrailAmt,Prev)));


{Signal close of Long position if Trailstop hit}
LongstopTrail:= if(c<=TrailStop,1,0);

{Signal close of Short position if TrailstopShort hit}
ShortstopTrail:= if(c>=TrailStopShort,1,0);

{Set flag1 to 1 if long signal detected and set to 0 if trailing stop of long position detected}
flag1:= if(Long=1,1,
if(LongstopTrail=1,0,prev));

{Set flag1 to 1 if short signal detected and set to 0 if trailing stop of short position detected}
shortflag1:= if(short=1,1,
if(ShortstopTrail=1,0,prev));

{Signal close of long position if close detected only if long position open}
SignalLongexit:= If (ref(Flag,-1)=1 And ref(Flag1,-1)=1 And LongStop=1,1,
If (ref(Flag,-1)=1 And ref(Flag1,-1)=1 And LongStopTrail=1,1,0));

{Signal close of short position if close detected only if short position open}
SignalShortexit:= If (ref(ShortFlag,-1)=1 And ref(ShortFlag1,-1)=1 And ShortStop=1,1,
If (ref(ShortFlag,-1)=1 And ref(ShortFlag1,-1)=1 And ShortStopTrail=1,1,0));

{Set LongPositionFlag to 1 if long position has been opened and set to 0 if exit of long position signaled.}
LongPositionflag:= if(longenter=1,1,
if(SignalLongexit=1,0,Prev));

{Set ShortPositionFlag to 1 if short position has been opened and set to 0 if exit of short position signaled.}
ShortPositionflag:= if(shortenter=1,1,
if(Signalshortexit=1,0,Prev));
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-12-2005, 04:40 PM
Alex.Piech.FinGeR's Avatar
Alex.Piech.FinGeR Alex.Piech.FinGeR is offline
Senior Member
 
Join Date: Oct 2005
Location: Germany
Posts: 305
Alex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud of
hi,

Code:
int Err=0;
int tPrLong;
int tPrShort;

if (tPrLong==0 || tPrShort==0)  Err=1;
-STOP


you please more Details :cool:

is this Metastock code ?

Timeframe ?

Pairs ?

or is this Virus or Wurm

Last edited by Alex.Piech.FinGeR : 10-12-2005 at 04:54 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-13-2005, 09:35 AM
hellkas hellkas is offline
Senior Member
 
Join Date: Oct 2005
Location: Porto/Portugal
Posts: 252
hellkas is on a distinguished road
Quote:
Originally Posted by Alex.Piech.FinGeR
hi,


is this Metastock code ?

Timeframe ?

Pairs ?

or is this Virus or Wurm

hi Alex...

Its my system in VT Trader... Its very profitable... :eek:

Timeframe: All, but I prefer 1H
Pairs: All

Thanks
Attached Images
File Type: jpg EurUsd.jpg (55.7 KB, 999 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-13-2005, 10:10 AM
Beluck's Avatar
Beluck Beluck is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Beluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud of
Quote:
Originally Posted by hellkas
Hi all

Anyone could make this EA?
As far as I can see it is 2EMA crossover system with T3MA confirmation and trailing stop.
Rules are as follows:
- long signal - fast EMA crosses slow EMA up and fast EMA is above T3MA;
- short signal - fast EMA crosses slow EMA down and fast EMA is below T3MA;
- long exit signal - fast EMA crosses slow EMA down;
- short exit signal - fast EMA crosses slow EMA up;
- trailing stop exits.

hellkas, can you confirm?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-13-2005, 10:25 AM
Beluck's Avatar
Beluck Beluck is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Beluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud ofBeluck has much to be proud of
Quote:
Originally Posted by hellkas
hi Alex...

Its my system in VT Trader... Its very profitable... :eek:

Timeframe: All, but I prefer 1H
Pairs: All

Thanks
do you have any stats for yoru system?

what values of parameters tPrLong, tPrShort, Periods and what types of fast and slow MA do you use?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 10-13-2005, 12:01 PM
hellkas hellkas is offline
Senior Member
 
Join Date: Oct 2005
Location: Porto/Portugal
Posts: 252
hellkas is on a distinguished road
hi Beluck

This system allows pip entry/exit filters to be applied to a MA Cross System that signals below a defined value are ignored. The system includes a trailing stoploss. The signal is a cross of a long MA of the open and a short MA of the close.


Trailing Stop Pips
Type: Float
0,0020


tPrLong:
Type: Integer
20
Exponential


tPrShort:
Type: Integer
5
Exponential


Price: Close

Periods:
Type: Integer
5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-13-2005, 02:01 PM
Alex.Piech.FinGeR's Avatar
Alex.Piech.FinGeR Alex.Piech.FinGeR is offline
Senior Member
 
Join Date: Oct 2005
Location: Germany
Posts: 305
Alex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud of
@Beluck make you this EA ?

or i make ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-13-2005, 02:18 PM
hellkas hellkas is offline
Senior Member
 
Join Date: Oct 2005
Location: Porto/Portugal
Posts: 252
hellkas is on a distinguished road
Hi Alex...

Isnt mine, but I use it.. Its Great...

If its yours, Im sorry and thanks...

Could you help me?

hellkkas
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-13-2005, 02:55 PM
Alex.Piech.FinGeR's Avatar
Alex.Piech.FinGeR Alex.Piech.FinGeR is offline
Senior Member
 
Join Date: Oct 2005
Location: Germany
Posts: 305
Alex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud ofAlex.Piech.FinGeR has much to be proud of
Hi hellkkas...

ok i make EA for MT 4

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 10-13-2005, 03:02 PM
hellkas hellkas is offline
Senior Member
 
Join Date: Oct 2005
Location: Porto/Portugal
Posts: 252
hellkas is on a distinguished road
Quote:
Originally Posted by Alex.Piech.FinGeR
Hi hellkkas...

ok i make EA for MT 4


Ok my friend... Thanks very much...


But where it is?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Raw Ideas newdigital Suggestions for Trading Systems 664 Yesterday 05:54 PM
Looking for some Fresh Ideas Emerald King Metatrader 4 3 01-11-2007 07:30 PM


All times are GMT. The time now is 09:08 AM.