Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 12/04/26 19:03
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (mistery, AndrewAMD), 5,869 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
EndDate not working #464018
01/13/17 21:30
01/13/17 21:30
Joined: Aug 2016
Posts: 95
Wien
T
trenki2 Offline OP
Junior Member
trenki2  Offline OP
Junior Member
T

Joined: Aug 2016
Posts: 95
Wien
I noticed that EndDate does not seem to work when I use my own Assets.csv file with price history downloaded from Yahoo.

When I set StartDate = 2005 and EndDate = 2006 the simulation still runs until now (2017).

This script reproduces the error:

Code:
function run()
{
	StartDate = 2005;
	EndDate = 2006;
	BarPeriod = 1440;
	Capital = 10000;
	Margin = 650;
	
	assetList("AssetsFXCMCFD.csv");
	assetHistory("MSFT", FROM_YAHOO);

	while (asset(loop("MSFT")))
	{
		vars price = series(priceClose());
		var rsi = RSI(price, 2);

		LifeTime = 5;		
		if (NumOpenLong == 0 && rsi < 5)
			enterLong();
	}
}



I get this in the simulation results:

Code:
Simulated account   AssetsFXCMCFD.csv 
Bar period          24 hours (avg 2088 min)
Test period         28.04.2005-12.01.2017 (2948 bars)
Lookback period     80 bars (16 weeks)



This is the relevant line for the AssetsFXCMCFD.csv:

Code:
Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol
MSFT,63.040,0.01,0,0,0.01,0.01,0,10,1,0,MSFT.us


Re: EndDate not working [Re: trenki2] #464051
01/17/17 18:12
01/17/17 18:12
Joined: Dec 2016
Posts: 13
Italy
Andrea66 Offline
Newbie
Andrea66  Offline
Newbie

Joined: Dec 2016
Posts: 13
Italy
Use a complete date :

StartDate = 20130324;
EndDate = 20130520;


Moderated by  Petra 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1