Fmfx auto-trader. Another new toy by Steve Hopwood

Post Reply
SWG123
Trader
Posts: 565
Joined: Wed Nov 16, 2011 3:02 pm
Location: Cape Town

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

Post by SWG123 »

SteveHopwood wrote: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
Timely. It so happens that - as a total coding tyro - I've been battling to adapt an EA to use an alternative indi to the one it natively references (nothing to do with this thread however). Thanks again, Maestro. :D
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 »

SWG123 wrote:Timely. It so happens that - as a total coding tyro - I've been battling to adapt an EA to use an alternative indi to the one it natively references (nothing to do with this thread however). Thanks again, Maestro. :D
This can be impossible sometimes. How easy it is to do depends on how well the indi was coded in the first place.

The first thing I do when approaching a custom indi is pray that it was coded by squalou.

This is a rare event, so the second thing I do is pray that it was not coded by an idiot. This is also quite rare.

The third thing I do is open the Data window. This gives a rough idea of which buffers the coder has used to store information. Hover the mouse over a candle and you will read the value/s held by the buffers. Bear in mind that the buffer index starts at 0, but displayed Value fields start at 1, so that buffer 1 stores the value shown as Value 2 in the data window etc.

Mind, different indis display differently in the data window, so it takes some playing around to work out exactly how to interrogate the indi successfully.

All of which goes some way to explain why I bloody hate bloody custom indis. :lol:

I would say, "Welcome to my world" except that only an idiot enters it. Instead, I will simply say, "Good luck. You need it."

: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.
2face
Posts: 2
Joined: Mon Oct 22, 2012 10:30 am

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

Post by 2face »

SteveHopwood wrote:SERIOUS WARNING

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.forexfactory.com/showthread. ... ost4431794, at the bottom of the post.
http://www.stevehopwoodforex.com/phpBB3 ... p?f=5&t=15
Hi Steve,

I would like to know if you can code this on Empty4.
Atlas Line Indicator
from http://daytradetowin.com/software.php
phil_trade

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

Post by phil_trade »

2face wrote:
SteveHopwood wrote:SERIOUS WARNING

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.forexfactory.com/showthread. ... ost4431794, at the bottom of the post.
http://www.stevehopwoodforex.com/phpBB3 ... p?f=5&t=15
Hi Steve,

I would like to know if you can code this on Empty4.
Atlas Line Indicator
from http://daytradetowin.com/software.php
Hi

Did you trade manually and successfully with this indi ?

from the site : no Empty4 terminal available !

The Atlas Line supports the following trading software: NinjaTrader 7, TradeStation 9.1, and eSignal 11. If your preferred platform is not listed, please let us know via the contact page.
2face
Posts: 2
Joined: Mon Oct 22, 2012 10:30 am

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

Post by 2face »

phil_trade wrote:
2face wrote:
SteveHopwood wrote:SERIOUS WARNING

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.forexfactory.com/showthread. ... ost4431794, at the bottom of the post.
http://www.stevehopwoodforex.com/phpBB3 ... p?f=5&t=15
Hi Steve,

I would like to know if you can code this on Empty4.
Atlas Line Indicator
from http://daytradetowin.com/software.php
Hi

Did you trade manually and successfully with this indi ?

from the site : no Empty4 terminal available !

The Atlas Line supports the following trading software: NinjaTrader 7, TradeStation 9.1, and eSignal 11. If your preferred platform is not listed, please let us know via the contact page.
Just a recommendation from a friend of mine. I just want to know any possibility to code it in Empty4
User avatar
ovisun
Trader
Posts: 63
Joined: Sun Mar 18, 2012 11:54 am
Location: Romania, Constanta

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

Post by ovisun »

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,
The long (green) set file is obtained when you save the set file from inside Strategy Tester of Empty4. And, at least for me, there is no problem if I loaded on a normal chart. Whatever is extra, is ignored by Empty4.

Regards.

PS: hope nobody will be upset by this post :)
Image
vadlapatis

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

Post by vadlapatis »

New to the Forum - So Saying first Hi to Every 1

just now loaded the the EA, Indi, Temp,

and loaded on AUDUSD/NZDUSD/USDCAD

let c wat will be the result

thank u once again for steve n fmfx
Post Reply

Return to “Automated trading systems”