Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, TedMar, dr_panther, Ayumi), 1,072 guests, and 1 spider.
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 1 of 2 1 2
Enter Trade with managing function #409969
10/25/12 19:44
10/25/12 19:44
Joined: Sep 2012
Posts: 24
G
Gattaca Offline OP
Newbie
Gattaca  Offline OP
Newbie
G

Joined: Sep 2012
Posts: 24
from the manual: The trade function is called every tick.
So my questions are: can this be backtested with the historic data you provide? Do you use this function in Z1/Z2?

Last edited by Gattaca; 10/25/12 19:48.
Re: Enter Trade with managing function [Re: Gattaca] #409983
10/26/12 06:09
10/26/12 06:09
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
For backtesting it, set the TICKS flag:

http://zorro-trader.com/manual/en/mode.htm

and yes, it is used in Z1 and Z2.

Re: Enter Trade with managing function [Re: jcl] #409993
10/26/12 11:07
10/26/12 11:07
Joined: Feb 2012
Posts: 37
S
stevegee58 Offline
Newbie
stevegee58  Offline
Newbie
S

Joined: Feb 2012
Posts: 37
I just read your link and I want to make sure I understand clearly.

1) If your base data is M1 and you are running the test in H1 the backtest normally uses H1 bars for trade management.
2) If you want to use the M1 data for more accurate trade management during H1 backtest, set the TICKS mode flag.

Is that correct?

Re: Enter Trade with managing function [Re: stevegee58] #410002
10/26/12 12:16
10/26/12 12:16
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, that's correct.

Re: Enter Trade with managing function [Re: jcl] #410009
10/26/12 14:33
10/26/12 14:33
Joined: Feb 2012
Posts: 37
S
stevegee58 Offline
Newbie
stevegee58  Offline
Newbie
S

Joined: Feb 2012
Posts: 37
As a follow-on, if I have M1 base data and run a backtest on M1 do you create synthetic ticks? For instance you can at least create 2 synthetic ticks, one for the open and one for the close. You could even create more than 2 ticks by guessing the path of price action based on the high and low.

Re: Enter Trade with managing function [Re: stevegee58] #410151
10/29/12 14:48
10/29/12 14:48
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
No, we do not create synthetic ticks in this version. An early Zorro version used synthetic ticks, but we found that the result was more different to real ticks then not using synthetic ticks at all.

Re: Enter Trade with managing function [Re: jcl] #413534
12/15/12 02:39
12/15/12 02:39
Joined: Sep 2012
Posts: 99
T
TankWolf Offline
Junior Member
TankWolf  Offline
Junior Member
T

Joined: Sep 2012
Posts: 99
jcl Im trying to use the trade function on one of my strategies that used H1 bars but I want trades to trigger during a bar if certain entry conditions have been met and Ive set the TICKS flag and in my backtest chart results looks to be exactly what it should be yet when I run the strategy in live trading, the trades are not triggering at all and Im just getting a ton of Missed Entry at Bar errors.

Also when I look at the logfile from the backtest that looks correct on the chart results. It shows this:

Quote:

13520: 10.03. 01:00] 0p 2/1
[GBP/USD::S] Missed entry at bar 13520
[AUD/USD::L] Missed entry at bar 13520
[NZD/USD::L] Missed entry at bar 13520
[USD/CAD::S] Missed entry at bar 13520
[USD/CAD::S2103] Short 100@1.0280 Risk 422

[13521: 10.03. 02:00] 0p 3/1
[EUR/USD::S1901] Target 90@1.3589: +129$ at 02:37
[GBP/USD::S] Missed entry at bar 13521
[AUD/USD::L] Missed entry at bar 13521
[NZD/USD::L] Missed entry at bar 13521

[13522: 10.03. 03:00] 1607p 3/1
[GBP/USD::S] Missed entry at bar 13522
[AUD/USD::L] Missed entry at bar 13522
[NZD/USD::L] Missed entry at bar 13522

[13523: 10.03. 04:00] 1607p 3/1
[EUR/USD::S] Missed entry at bar 13523
[GBP/USD::S] Missed entry at bar 13523
[AUD/USD::L] Missed entry at bar 13523
[NZD/USD::L] Missed entry at bar 13523
[EUR/USD::S2403] Short 91@1.3605 Risk 383


The trades on the logfile say they are opening at the start of each bar but the chart results show trades trigging where they should during H1 bars. Any help would be appreciated.

P.S - Here is a code Im using for entry just incase Im doing something wrong.
Quote:

if(ConditionA > ConditionB && NumOpenLong == 0) {
Entry = EMA1[0] - Close[0];
Stop = 10*PIP;
TakeProfit = 50*PIP;
enterLong(0,Entry,Stop,TakeProfit);
}

Re: Enter Trade with managing function [Re: TankWolf] #413538
12/15/12 08:55
12/15/12 08:55
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The .log looks ok to me, so I am not sure what the problem is. If you want to check the start and end time of a trade, open the .csv spreadsheet in Excel. You can find the description of the spreadsheet in the manual under "data export".


Re: Enter Trade with managing function [Re: TankWolf] #413539
12/15/12 08:58
12/15/12 08:58
Joined: Sep 2012
Posts: 99
T
TankWolf Offline
Junior Member
TankWolf  Offline
Junior Member
T

Joined: Sep 2012
Posts: 99
Hmmm ok Ive been looking through charts and it seems that my script is not executing any trades on a Friday and since I ran this script for the first time on Friday it now makes more sense why trades didnt execute even though my rules said they should of. But also looking through the backtest it seems there is no trades on Fridays there either so I obviously have a problem somewhere in my script, will try playing with it now Ive atleast narrowed it down a bit might not be my trade management function afterall.

Re: Enter Trade with managing function [Re: TankWolf] #413670
12/16/12 10:43
12/16/12 10:43
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
I can execute trades on Friday with my own script, maybe you opened trades too late? I think the weekend begins Friday 20:00 and there is no trading during the weekend.

Page 1 of 2 1 2

Moderated by  Petra 

Gamestudio download | chip programmers | 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