Fmfx auto-trader. Another new toy by Steve Hopwood

Post Reply
Fmfx
Trader
Posts: 264
Joined: Sun Dec 18, 2011 10:37 am
Location: West Africa

Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Post by Fmfx »

SteveHopwood wrote:
Fmfx wrote:Thanks Steve :)

Attached is the moded version.

:)
What problem are you having?

:D
Thanks Boss,

The problem is that the ea still takes trades even when the rsi is in between 55 and 45 level (Ranging).

Thanks
Regards
N☺̴̩̩̥̩̩̩ Ri$k. N☺̴̩̩̥̩̩̩ я̩̥̊Ƹwªrd
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Post by SteveHopwood »

I am confused.

Your source code:
extern string trsi="Rsi trend detection";
extern bool UseRsiTrendDetection=false;
extern int RsiTdTf=1440;
extern int RsiTdPeriod=20;
extern string trs="Applied price: 0=Close; 1=Open; 2=High";
extern string trs1="3=Low; 4=Median; 5=Typical; 6=Weighted";
extern int RsiTdAppliedPrice=0;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
double TrendRsiVal;//Rsi
string RsiTrend;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Your set file:
UseRsiTrendDetection=1
RsiTdTf=240
RsiTdTf,F=0
RsiTdTf,1=1440
RsiTdTf,2=0
RsiTdTf,3=0
RsiTdPeriod=14
RsiTdPeriod,F=0
RsiTdPeriod,1=20
RsiTdPeriod,2=0
RsiTdPeriod,3=0
trs=Applied price: 0=Close; 1=Open; 2=High
trs1=3=Low; 4=Median; 5=Typical; 6=Weighted
RsiTdAppliedPrice=0
RsiTdAppliedPrice,F=0
RsiTdAppliedPrice,1=0
RsiTdAppliedPrice,2=0
RsiTdAppliedPrice,3=0

The two do not match up. You appear to have more inputs in your set file than you have in your source code.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Fmfx
Trader
Posts: 264
Joined: Sun Dec 18, 2011 10:37 am
Location: West Africa

Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Post by Fmfx »

SteveHopwood wrote:I am confused.

Your source code:
extern string trsi="Rsi trend detection";
extern bool UseRsiTrendDetection=false;
extern int RsiTdTf=1440;
extern int RsiTdPeriod=20;
extern string trs="Applied price: 0=Close; 1=Open; 2=High";
extern string trs1="3=Low; 4=Median; 5=Typical; 6=Weighted";
extern int RsiTdAppliedPrice=0;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
double TrendRsiVal;//Rsi
string RsiTrend;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Your set file:
UseRsiTrendDetection=1
RsiTdTf=240
RsiTdTf,F=0
RsiTdTf,1=1440
RsiTdTf,2=0
RsiTdTf,3=0
RsiTdPeriod=14
RsiTdPeriod,F=0
RsiTdPeriod,1=20
RsiTdPeriod,2=0
RsiTdPeriod,3=0
trs=Applied price: 0=Close; 1=Open; 2=High
trs1=3=Low; 4=Median; 5=Typical; 6=Weighted
RsiTdAppliedPrice=0
RsiTdAppliedPrice,F=0
RsiTdAppliedPrice,1=0
RsiTdAppliedPrice,2=0
RsiTdAppliedPrice,3=0

The two do not match up. You appear to have more inputs in your set file than you have in your source code.

:D

Hi Boss,

This is kind of confusing :), i'm cracking my brain here but couldn't figure out where that came from :roll:

Men i have along way to go :roll:
N☺̴̩̩̥̩̩̩ Ri$k. N☺̴̩̩̥̩̩̩ я̩̥̊Ƹwªrd
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Post by SteveHopwood »

You have posted a set file with more inputs than your source code. Either you have posted the wrong source, or the wrong set. From you set, it looks as though you are using a mtf Rsi, but this does not show up in your source.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Fmfx
Trader
Posts: 264
Joined: Sun Dec 18, 2011 10:37 am
Location: West Africa

Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Post by Fmfx »

Yes boss, i think the set file is wrong, probably i mixed it.

And attached is the mtf sri indicator i was trying to incorporate.

Thanks
You do not have the required permissions to view the files attached to this post.
N☺̴̩̩̥̩̩̩ Ri$k. N☺̴̩̩̥̩̩̩ я̩̥̊Ƹwªrd
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Post by SteveHopwood »

Fmfx wrote:Yes boss, i think the set file is wrong, probably i mixed it.

And attached is the mtf sri indicator i was trying to incorporate.

Thanks
Forget the mtf Rsi - that is for chart display only. For an ea, you use calls to the resident RSI that ships with Empty4.

Save the attached using a different name, so you do not lose your original source. What I have done is added code that make the mtf calls to the D1 and H1 time frames, to give you examples you can adapt for your own use:
  • 1) to the inputs list. Note how the inputs have the same names apart from the prefixes D1 and H1 - makes it a lot easier to work with variables.
    2) to void TrendDetectionModule(), that sets up the two trend variables
    3) to void LookForTradingOpportunities(), showing how to use the defined trends to allow/cancel the potential trade.
From this, you can see how it is possible to add infinite Rsi trend spotting thingies by copy/paste/edit. Have fun.

:D

Note: Remember that my additions are untested code and that I am a crap copy/paste/editor, so there may be bugs. What I am trying to pass on here is a general idea.
You do not have the required permissions to view the files attached to this post.
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Fmfx
Trader
Posts: 264
Joined: Sun Dec 18, 2011 10:37 am
Location: West Africa

Noted boss

Post by Fmfx »

Thanks Boss, noted.

I will have it on my vps on monday as soon as market opens, thanks for your kind help, God bless :D.

Regards
N☺̴̩̩̥̩̩̩ Ri$k. N☺̴̩̩̥̩̩̩ я̩̥̊Ƹwªrd
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Noted boss

Post by SteveHopwood »

Fmfx wrote:Thanks Boss, noted.

I will have it on my vps on monday as soon as market opens, thanks for your kind help, God bless :D.

Regards
Don't you dare do anything of the sort. Do so and it will destroy your hard drive and burn down your home.

The point of what I posted was to give you a general nudge in the right direction, not a tradable EA. You must adapt it first to avoid the above consequences.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Fmfx
Trader
Posts: 264
Joined: Sun Dec 18, 2011 10:37 am
Location: West Africa

Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Post by Fmfx »

Ho :o , like i said earlier i have a long way to go. I will give it a go at day break, its 01:00am here already.

Thanks once again boss :D.

Regards
N☺̴̩̩̥̩̩̩ Ri$k. N☺̴̩̩̥̩̩̩ я̩̥̊Ƹwªrd
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: Fmfx auto-trader. Another new toy by Steve Hopwood

Post by SteveHopwood »

I see that someone other than Fmfx is interested in what is going on here, so a few more words of explanation.

Those of us who are not trained programmers have to adopt our own coding style. In doing so, consistency helps a lot. Look at the code snippet that offers up external inputs to the user when the EA uses a moving average:

Code: Select all

extern string  mai="----Moving average----";
extern int     MaTF=0;//Time frame defaults to current chart 
extern int     MaPeriod=50;
extern int     MaShift=0;//The MA Shift input
extern string  mame="Method: 0=sma; 1=ema; 2=smma;  3=lwma";
extern int     MaMethod=1;
extern string  maap="Applied price: 0=Close; 1=Open; 2=High";
extern string  maap1="3=Low; 4=Median; 5=Typical; 6=Weighted";
extern int     MaAppliedPrice=0;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
double         MaVal;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Now remove the 'Ma' from each input:

Code: Select all

extern int     TF=0;//Time frame defaults to current chart 
extern int     Period=50;
extern int     Shift=0;//The MA Shift input
extern string ame="Method: 0=sma; 1=ema; 2=smma;  3=lwma";
extern int     Method=1;
extern string  ap="Applied price: 0=Close; 1=Open; 2=High";
extern string  ap1="3=Low; 4=Median; 5=Typical; 6=Weighted";
extern int     AppliedPrice=0;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
double         Val;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
What we are left with is a generic set of inputs that relate to the fields of indi's that we use all the time on our charts.

So, all I do when setting up a group of external inputs is place a shortened form of the indi in front of the variables to customise them - RsiTF, AtrTF, BandsTF etc

As my amateur coding evolves, so does my ability to structure my code in such a way that LUC has fewer and fewer opportunities to invite his buddies for lunch. Variable naming consistency helps me a lot.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Post Reply

Return to “Automated trading systems”