Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Entry price not within the bar in test mode #481388
09/07/20 13:49
09/07/20 13:49
Joined: Nov 2014
Posts: 25
K
kkfx Offline OP
Newbie
kkfx  Offline OP
Newbie
K

Joined: Nov 2014
Posts: 25
Hi,

called function:
enterLong(10,1.332);

EUR_USD,2012-02-09 12:00:00,1.327880,1.328230,1.325010,1.325210,0
EUR_USD,2012-02-09 13:00:00,1.325210,1.325810,1.323480,1.325120,0
EUR_USD,2012-02-09 14:00:00,1.325120,1.330880,1.324090,1.327770,0 <--- The OHLC when the enterLong
EUR_USD,2012-02-09 15:00:00,1.327770,1.332180,1.327020,1.331130,0
EUR_USD,2012-02-09 16:00:00,1.331130,1.331570,1.326890,1.330360,0

From the log :
[8543: Thu 12-02-09 14:00] 130035 0 130/153 (1.32777)
(EUR/USD::L) Long 10@1.33200 Entry stop
(EUR/USD::L) Entry stop 1.33200 hit at 14:00:00
[EUR/USD::L4401] Long 10@1.33165 Risk 37489 at 14:00:00

My question is where is this 1.33165 comes from ? I could have wrong or missed some config but have been trying to search and still no idea what happened.

Any advise is much appreciated.

Thanks

Re: Entry price not within the bar in test mode [Re: kkfx] #481398
09/08/20 05:15
09/08/20 05:15
Joined: Nov 2014
Posts: 25
K
kkfx Offline OP
Newbie
kkfx  Offline OP
Newbie
K

Joined: Nov 2014
Posts: 25
Hi,

Can someone give some clue please ?

Last edited by kkfx; 09/08/20 05:20.
Re: Entry price not within the bar in test mode [Re: kkfx] #481400
09/08/20 09:51
09/08/20 09:51
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
Post the script in full; which Zorro version is this with?

Re: Entry price not within the bar in test mode [Re: kkfx] #481401
09/08/20 15:40
09/08/20 15:40
Joined: Nov 2014
Posts: 25
K
kkfx Offline OP
Newbie
kkfx  Offline OP
Newbie
K

Joined: Nov 2014
Posts: 25
HI,

Zorro version :S 2.12.2

Where does this 1.29355 comes from in Zorro log while entry is 1.29345.Code is attached.

[1: Mon 12-01-02 05:00] 100000 0 0/0 (1.29253)
(EUR/USD::L) Entry stop 1.29345 hit at 05:00:00
[EUR/USD::L0201] Long 10@1.29355 Risk 487 p at 05:00:00

Below is my log:
Place order at 20120102 05:00 entry:1.293450,Stop:1.290950

OHLC data:
open high low close
EUR_USD,2012-01-02 04:00:00,1.296780,1.296780,1.292420,1.292950,0
EUR_USD,2012-01-02 05:00:00,1.292950,1.293400,1.292310,1.292530,0 <--- EnterLong
EUR_USD,2012-01-02 06:00:00,1.292530,1.293780,1.292420,1.293130,0
EUR_USD,2012-01-02 07:00:00,1.293130,1.294310,1.292750,1.293780,0
EUR_USD,2012-01-02 08:00:00,1.293780,1.294690,1.292980,1.293980,0

Code:
#include <default.c>
#include "HY_PrintLog.c"

bool Ordered=false;
string Symbols="EUR/USD";
void Init()
{

if(is(INITRUN))
{
BarPeriod=60;
Capital = 100000;
PIP=0.0001;
if(!is(TRADEMODE))
{
LookBack=0;
StartDate = 20120101;
EndDate = 20141231;
}
Lots=10;
set(LOGFILE);
CLEARLOG();
asset(Symbols);
}

}

function run()
{
Init();

if(NumOpenLong==0)
{
enterLong(10,priceOpen()+5*PIP,priceOpen()-20*PIP,priceOpen()+40*PIP);
char chInfo[1024];
sprintf(chInfo,"\nPlace order at %04d%02d%02d %02d:00 entry:%f,Stop:%f",year(),month(),day(),hour(0),priceOpen()+5*PIP,priceOpen()-20*PIP) ;
LOG(chInfo);
}

}

Last edited by kkfx; 09/08/20 23:06.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1