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.