Gamestudio Links
Zorro Links
Newest Posts
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
2 registered members (AndrewAMD, Ayumi), 1,405 guests, and 4 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
why no trades listed if lookback larger? #476197
02/04/19 03:02
02/04/19 03:02
Joined: Apr 2014
Posts: 24
yebit Offline OP
Newbie
yebit  Offline OP
Newbie

Joined: Apr 2014
Posts: 24
int maxnum=100;
int curtradenum=0;

int cleanup() {
int numtrades=0;

watch("enterlong #", curtradenum);
for(all_trades) {
numtrades++;
}
watch("all_trades # = ", numtrades);
numtrades=0;
for(last_trades) {
numtrades++;
}
watch("last_trades # = ", numtrades);
}

void run() {
if (is(INITRUN)) {
watch("runstart");
History=".t1";
LookBack=100;
set(TICKS); //is said to cause TMF to be called each tick.
BarPeriod=1; //MUST be set in INITRUN (or the initial run of function run, or it is ignored, and cannot be changed.
BarZone=ET;
StartDate = 20161001;
EndDate = 20161015;
TakeProfit=10*PIP;
Stop=10*PIP;
} else {
if (curtradenum < maxnum) {
enterLong();
curtradenum++;
}
}
}

if lookback set to 100
enterlong# 100
all_trades# 0
last_trades# 0

if lookback set to 10
enterlong #100
all_trades# 20
last_trades# 20

why is difference?

Re: why no trades listed if lookback larger? [Re: yebit] #476199
02/04/19 08:29
02/04/19 08:29
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Longer lookback -> shorter test -> fewer trades.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1