Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 857 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Backtest Result-Equity Chart not working properly #463109
11/15/16 18:09
11/15/16 18:09
Joined: Nov 2016
Posts: 35
therealLeon Offline OP
Newbie
therealLeon  Offline OP
Newbie

Joined: Nov 2016
Posts: 35
Hello,

i wrote a BreakOut Strategie using lhour(CET) to get the right timezone for Germany, Bremen.

The Backtest Result - Chart Window seems not to work properly. The time frame and the day frame is not showing the correct time nor Is the Window showing all dates of the week.

See attachment example (should show 01.09.2016 to 15.09.2016 - but is just showing a few days, not all of them

Does anybody got an idea how to fix this?

Attached Files Backtest Result - Chart Window.png
Re: Backtest Result-Equity Chart not working properly [Re: therealLeon] #463115
11/15/16 23:52
11/15/16 23:52
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline
Senior Member
boatman  Offline
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
Can you post the script that produced this result? Can't tell much without that.

Re: Backtest Result-Equity Chart not working properly [Re: boatman] #463140
11/16/16 21:42
11/16/16 21:42
Joined: Nov 2016
Posts: 35
therealLeon Offline OP
Newbie
therealLeon  Offline OP
Newbie

Joined: Nov 2016
Posts: 35
This trategy based on a version from swingtraderkk from an older post - i added a few things. Not sure if that ist really the reason for graph failures. How to avoid these Chart Axis failures?
I dont know how to enter code in a window here - sorry to do it directly in the box:

function run()
{

set(LOGFILE+PARAMETERS+FACTORS);

DataSplit = 60;
NumWFOCycles = 10;
Capital = 500;

if(ReTrain)
{
UpdateDays = -1;
SelectWFO = -1;
reset(FACTORS);
}

BarPeriod = 1;
LookBack = 90/BarPeriod;
Hedge = 1;

StartDate = 20100901;


int marketstarthour = 8;
int marketstartminute = 0;
int marketendhour = 17;
int marketendminute = 00;

vars hi = series(priceHigh());
vars lo = series(priceLow());

//Find the high low range of first hours trading
vars enthigh = series(MaxVal(hi,60/BarPeriod));
vars entlow = series(MinVal(lo,60/BarPeriod));

int SetStop = optimize(10,20,60,10);
int SetTrail = optimize(10,20,60,10);

//printf("\n%2.0d:%2.0d High %4.1f Low %4.1f enthigh %4.1f entlow %4.1f",lhour(CET),minute(),hi[0],lo[0],enthigh[0],entlow[0]);

if (NumPendingTotal == 1)
{
for(open_trades)
{
if(TradeIsPending)
exitTrade(ThisTrade);
}
}


if ((lhour(CET) == marketstarthour+1)
and (minute() == marketstartminute))
{

EntryTime = 420/BarPeriod; // Expire pending trades at 16:00

enterLong(0,enthigh[0],SetStop,0,SetTrail);
enterShort(0,entlow[0],SetStop,0,SetTrail);
}


if (((lhour(CET) >= marketendhour)
and (minute() >= marketendminute)) and (NumOpenTotal > 0))
{
printf("\nExiting Open Trades");
exitLong();
exitShort();
}
}

Re: Backtest Result-Equity Chart not working properly [Re: therealLeon] #463173
11/20/16 03:09
11/20/16 03:09
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline
Senior Member
boatman  Offline
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
When I run this script, I get chart output that covers the entire period. Check your History folder - maybe you don't have enough historical market data to run the entire simulation that you want.

Also, your stop loss values don't make much sense. You are optimizing over a range of 20-60, which would only make sense for some equity indexes, futures or high-priced stocks. Better to set your stop loss taking into consideration the size of a pip. That way, your script is applicable to individual markets, regardless of the price they trade at. For example, instead of Stop = 60, try Stop = 60*PIP.

Hope that helps.

Re: Backtest Result-Equity Chart not working properly [Re: boatman] #463201
11/21/16 14:57
11/21/16 14:57
Joined: Nov 2016
Posts: 35
therealLeon Offline OP
Newbie
therealLeon  Offline OP
Newbie

Joined: Nov 2016
Posts: 35
Hello boatman,

thanks for your response i will take it in account!


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1