Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, howardR), 472 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Walk Forward Analysis Equity Curve #482740
03/22/21 01:04
03/22/21 01:04
Joined: Mar 2021
Posts: 24
A
antoniorenar Offline OP
Newbie
antoniorenar  Offline OP
Newbie
A

Joined: Mar 2021
Posts: 24
Hello,

In the 2 last lines of the code below I've tried to plot the walk forward analysis equity curve. Nevertheless, when I press the "Train" button I only obtain the parameter graphs. And if I then press the "result" button, I still don't get the walk forward equity curve. May anyone help me to solve the problem, please?

#include <profile.c>

function run()
{
set(LOGFILE);
set(PARAMETERS);

StartDate=2018;
NumYears=1;

BarPeriod = 1440;

//FOR WALK FORWARD ANALYSIS:
NumWFOCycles = 3;
DataSplit = 20;

//PARAMETERS TO BE OPTIMIZED:
int stoploss = optimize(30,10,50,10);
int stopprofit = optimize(60,20,80,10);

//ENTRIES:
if( NumOpenLong==0 and priceClose(0)>priceClose(1) ) enterLong();
if( NumOpenShort==0 and priceClose(0)<priceClose(1) ) enterShort();

//EXITS:
Stop = stoploss*PIP;
TakeProfit = stopprofit*PIP;

//PLOT EQUITY CURVE (WALK FORWARD):
set(PLOTNOW);
plotWFOCycle(Equity,0);
}

Re: Walk Forward Analysis Equity Curve [Re: antoniorenar] #482751
03/24/21 23:16
03/24/21 23:16
Joined: Mar 2021
Posts: 1
F
ferboes Offline
Guest
ferboes  Offline
Guest
F

Joined: Mar 2021
Posts: 1
I have the same problem. frown

Re: Walk Forward Analysis Equity Curve [Re: antoniorenar] #482758
03/25/21 19:50
03/25/21 19:50
Joined: Aug 2020
Posts: 59
London
Neb Offline
Junior Member
Neb  Offline
Junior Member

Joined: Aug 2020
Posts: 59
London
Hi,

As manual said, I think after training, you should go to test, with this parameters (which are already saved in Data folder.)
And then you should get equity curve.
Not before.

Neb

Re: Walk Forward Analysis Equity Curve [Re: Neb] #482759
03/25/21 20:05
03/25/21 20:05
Joined: Mar 2021
Posts: 24
A
antoniorenar Offline OP
Newbie
antoniorenar  Offline OP
Newbie
A

Joined: Mar 2021
Posts: 24
I know there is a folder in which Zorro save the daily data in a csv file, but I do not know how to use this file in order to plot the walk forward equity curve. May you help me with an example, please?

Re: Walk Forward Analysis Equity Curve [Re: antoniorenar] #482777
03/27/21 21:31
03/27/21 21:31
Joined: Aug 2020
Posts: 59
London
Neb Offline
Junior Member
Neb  Offline
Junior Member

Joined: Aug 2020
Posts: 59
London
I think you made a couple of mistakes probably.
First, you need to make series from priceClose().

vars Closes = series(priceClose());


if( NumOpenLong==0 and Closes[0]>Closes[1]) enterLong();
if( NumOpenShort==0 and Closes[0]<Closes[1]) enterShort();


I also commented line:

//plotWFOCycle(Equity,0);

And then, did traing and test and after that Zorro plotted me equity line.

Maybe it helps ?

Neb


Last edited by Neb; 03/27/21 21:36.
Re: Walk Forward Analysis Equity Curve [Re: Neb] #482794
03/29/21 23:16
03/29/21 23:16
Joined: Mar 2021
Posts: 24
A
antoniorenar Offline OP
Newbie
antoniorenar  Offline OP
Newbie
A

Joined: Mar 2021
Posts: 24
Hi Neb,

First of all, I apologize for my delay in replying, as I have been busy. Following your instructions, I have programmed this:

#include <profile.c>

function run()
{
set(LOGFILE);
set(PARAMETERS);

StartDate=2018;
NumYears=1;

BarPeriod = 1440;

//FOR WALK FORWARD ANALYSIS:
NumWFOCycles = 3;
DataSplit = 20;

//PARAMETERS TO BE OPTIMIZED:
int stoploss = optimize(30,10,50,10);
int stopprofit = optimize(60,20,80,10);

vars Closes = series(priceClose());

//ENTRIES:
if( NumOpenLong==0 and Closes[0]>Closes[1] ) enterLong();
if( NumOpenShort==0 and Closes[0]<Closes[1] ) enterShort();

//EXITS:
Stop = stoploss*PIP;
TakeProfit = stopprofit*PIP;

//PLOT EQUITY CURVE (WALK FORWARD):
set(PLOTNOW);
}

When I press the Train button and then Test I obtain an equity curve, but... are you sure it is the walk forward equity curve and not another equity curve with the same parameters in all the periods? How can we know it, Neb?


By the way, it is not necessary to use:

vars Closes = series(priceClose());
if( NumOpenLong==0 and Closes[0]>Closes[1]) enterLong();
if( NumOpenShort==0 and Closes[0]<Closes[1]) enterShort();

This is correct, but it also do the same as:

if( NumOpenLong==0 and priceClose(0)>priceClose(1) ) enterLong();
if( NumOpenShort==0 and priceClose(0)<priceClose(1) ) enterShort();


Thank you very much for your help, Neb!


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1