Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (dr_panther, Quad, AndrewAMD, 7th_zorro), 945 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: "Missed entry at bar XXX" errors in log [Re: jcl] #410728
11/07/12 18:27
11/07/12 18:27
Joined: Oct 2012
Posts: 16
Aix en Provence, France
Squalou Offline OP
Newbie
Squalou  Offline OP
Newbie

Joined: Oct 2012
Posts: 16
Aix en Provence, France
TimeWait = 2
does the trick (on daily charts).

no more "Missed entry".

That would be worth noticing in the run() manual.

Thanks.

Sq

Re: "Missed entry at bar XXX" errors in log [Re: Squalou] #410729
11/07/12 18:43
11/07/12 18:43
Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
P
PriNova Offline
Junior Member
PriNova  Offline
Junior Member
P

Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
Does this mean, that i have to check if the dailybar is a friday candle and set TimeWait accordingly especially for this day and for the other candles at =0?

because if i set TimeWait = 2 for every dailybar the entry would be delayed 2 days for every trade.

Signal at monday means entry at wednesday? IMHO nonsense.

BTW: @squalou from ff.com and steve? if yes, obeisance.
Me global Mod from biggest german forex-forum at forexfabrik.de and Avatar Mediator @steve -> cointegration Search Engine

Last edited by PriNova; 11/07/12 18:48.
Re: "Missed entry at bar XXX" errors in log [Re: PriNova] #410733
11/07/12 20:10
11/07/12 20:10
Joined: Oct 2012
Posts: 16
Aix en Provence, France
Squalou Offline OP
Newbie
Squalou  Offline OP
Newbie

Joined: Oct 2012
Posts: 16
Aix en Provence, France
The manual says:

Quote:
TimeWait
When an enter command is given, wait the given number of bars (default: 1) until the entry condition (Entry) is met; otherwise cancel the trade. A "Missed Entry" message is then printed to the log file.


TimeWait is the MAXIMUM time to wait for the entry condition to be met before bailing out with the error.
The trade will be entered as soon as the condition is met, so immediately if enter at market and market is open.


@PriNova: yes, i am Squalou from FF and Steve's forums...
So you are the cointegration guy ? !!
Your thread and research have attracted a lot of people there!
I must say we are missing you!
How is cointegtration going ?

Re: "Missed entry at bar XXX" errors in log [Re: Squalou] #410800
11/09/12 07:59
11/09/12 07:59
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
We have just internally discussed the problem of weekend trades. The problem is this: When you set TimeWait = 2 for entering trades Friday midnight and executing them Monday morning, you would create an artificial difference between simulation and real trading. In real trading, a broker platform would reject those trades. The TimeWait variable was normally intended for entry tagets, not as a trick to enable weekend trades.

Therefore we would like to disable trades on Weekends entirely, no matter how you set TimeWait. You can enable weekend trades with the "Weekend" variable anyway, but then you know what you're doing.

What do you think - would that be ok for you?

Re: "Missed entry at bar XXX" errors in log [Re: jcl] #410819
11/09/12 14:00
11/09/12 14:00
Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
P
PriNova Offline
Junior Member
PriNova  Offline
Junior Member
P

Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
i'm a little bit confused.
if there is no weekend candle than weekend-trades do not exists. if, like it is written in the manual, i execute a trade at the opening of every candle, then there should not be a problem with this.

the usual process in my mind is (daily-strategy):
1. new candle opens (Friday)
2. run code and check for conditions.
3a If conditions are TRUE open trade
3b if conditions are FALSE wait until open of next candle, in this situation the Monday candle at first open-tick and process with number 2.
4. During the course of a candle check conditions for TP, TS or SL.

in simple every markettick is like a cpu tick.
fetching data
process, evaluate, calculate data
output data (trade entry, TP, SL, TS or exit)

Last edited by PriNova; 11/09/12 14:27.
Re: "Missed entry at bar XXX" errors in log [Re: jcl] #410822
11/09/12 14:32
11/09/12 14:32
Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
P
PriNova Offline
Junior Member
PriNova  Offline
Junior Member
P

Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
i'm little confused much more now.

Quote:
# Trade enter or exit commands in the run function are executed at the opening price of the next bar.


what happens at livetrading? for example.

if conditions are met inbetween the actual candle before its closing, does a TP, SL or TS are not executed until the next candel opens?

Last edited by PriNova; 11/09/12 14:33.
Re: "Missed entry at bar XXX" errors in log [Re: PriNova] #410824
11/09/12 15:10
11/09/12 15:10
Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
P
PriNova Offline
Junior Member
PriNova  Offline
Junior Member
P

Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
Ok, here is a simple result of a simple script.
the strategy should open a trade at every pricelevel @1.4300
i set in the script the TICKS function and test in a 1 Hourchart.
usually the strategy should open very much trades, but opens only 2 orders.
this are the orders where the open of a 1 hour candle was exactly at 1.4300.
In my opinion: this is a big bug. like i stated befor. the execution of a trade shoudl process immediately if the conditions are right, otherwise a trader likes to open a trade at the open of a new candle. this is a normal process, that i usually check at open of a new bar the conditions at the last bar.

for example if a MA cross happens then i take the value of bar 2 and the value of bar 1 and calculate the possible cross. this process happens at opening at Bar 0 and if conditions met, the trade opens at the next tick and not at the very next opene of bar.

maybe i'm doing something wrong and i'm an idiot, but if not, then Zorro is in a not-acceptable state.
here is the script and a picture of this script:

function run()
Code:
function run()
{
	set(TICKS);
	NumDays = 500;
	var priceLevel = 1.4300;
	if(priceOpen() == priceLevel)
	{
		enterLong();
	}
	
}





i draw a line, where the pricelevel is, then you can imagine that there must be more orders executed

@jcl: if you are not understanding my english then it is easier for me to explain in german. we could also have a skype session if you want.

Last edited by PriNova; 11/09/12 17:25.
Re: "Missed entry at bar XXX" errors in log [Re: jcl] #410827
11/09/12 15:33
11/09/12 15:33
Joined: Oct 2012
Posts: 16
Aix en Provence, France
Squalou Offline OP
Newbie
Squalou  Offline OP
Newbie

Joined: Oct 2012
Posts: 16
Aix en Provence, France
Hi jcl,

Thank you very much for taking this seriously.

I agree that taking a trade on friday midnight (= on the last tick of friday) would most probably fail due to timeout, in real-time.

What do you mean by "disabling trades entered on Weekends" ?
Would this mean that a trade taken at the "end" of Friday candle is delayed until Monday opening ?
In backtesting mode only ?

That would fix it.

Is this something you will add to the next release (1.02?) ?

Thanks again.

Sq

Re: "Missed entry at bar XXX" errors in log [Re: Squalou] #410831
11/09/12 17:58
11/09/12 17:58
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Prinova: Your english is fine, just your script example is improvable laugh : Your script will almost never trade because your comparison is almost never true. The reason is explained in the "if" lesson of the lite-C course - look for "tip 3".

Squalou: With disabling I mean that they are just ignored. They are not pending until Monday. Yes, this is supposed to be added to 1.03.

The Friday bar ends Saturday 00:00 UTC, regardless of when the last price quotes arrived. Weekend normally begins Friday 22:00 UTC and ends Sunday 23:00 UTC, so all trades entered inbetween will then be ignored.

Re: "Missed entry at bar XXX" errors in log [Re: jcl] #410832
11/09/12 18:13
11/09/12 18:13
Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
P
PriNova Offline
Junior Member
PriNova  Offline
Junior Member
P

Joined: Sep 2012
Posts: 74
Niedersachsen, Germany
thank you for your answer.
i did modify the script and repeated the test in 1 Minute-Chart and 60-Minute Chart with different results.

in 60 Minute-Chart i got my 2 trades like in the last post, but in the M1 Chart Zorro opens all trades at the mentioned priceLevel.

Does Zorro do not take 1 Minute-datas in a 60 Minute-Test? i usually expected the same orders indepentend of timefrime.

Code:
set(TICKS+HEDGING);
function run()
{
	
	NumDays = 500;
	var priceLevel1 = 1.4300;
	if( (priceOpen() >= priceLevel1) and (priceOpen() <= priceLevel1 ))
	{
		enterLong();
	}
	
}


Last edited by PriNova; 11/09/12 18:13.
Page 2 of 3 1 2 3

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1