Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (clonman, TipmyPip, Niels, dBc, 1 invisible), 18,961 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

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


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1