Trade Tick as default?

Posted By: SFF

Trade Tick as default? - 01/04/13 09:50

Hi,

I just did my first live demo trading at FXCM.
Here are few things I just noticed.

To see how Zorro performs I selected 1 min TF and see how it would go.
Seeing the logs at the console Some of my trades were executed at broken time like 15:19.
I thought Zorro opens/closes only at .00.

Is this because Zorro trades tick as default?
Or just a delay which it should be at .00?

and secondly,

I just wanted to test from 2013, but no trades was executed thus no results, except short time frame like 1min, 5min.
It seems like that for demo trading it holds true.
For daily MA system, a long period like 800 EMA doesn't work from 2013.
Even a short MA like 2 EMA doesn't work. It seems not because alookback period.

Thanks in advance.
Posted By: jcl

Re: Trade Tick as default? - 01/04/13 10:11

With 1 min TF, Zorro trades every minute, so 15:19 is fine.

For all tests that include 2013, you need a complete 2012 data set, otherwise you have a gap from November to December. So either download it with the trick that I explained in the other thread, or wait for our price data upload next week. This does not affect life trading, only test.
Posted By: SFF

Re: Trade Tick as default? - 01/04/13 15:00

Maybe does daily trade happen between 0:00 - 23:59?

Anyway Here is the interesting test result.
It says that Test period 03.01.2013-03.01.2013
Annual return 3193% with only 1 trade.
Number of trades 1 (1461/year)

Will this strategy trade 1461 trade in 2013?

Is it a bug? or just because of imcomplete dates?
I don't understand.

Please test it with EUR/USD, 15 min TF only from 2013.
Thanks in advance.

Code:
function run(){
	
	StartDate = 2013;
	
   int FastPeriod = 8;
   int SlowPeriod = 21;
   int SignalPeriod = 9;
	
	vars Close = series(priceClose());
	
	
	MACD(Close,FastPeriod,SlowPeriod,SignalPeriod);
	vars MainLine = series(rMACD);
	vars SignalLine = series(rMACDSignal);
	vars Hist = series(rMACDHist);
	

   
   if(crossOver(MainLine,SignalLine)){

    
exitShort();
    enterLong();
    }

   if(crossUnder(MainLine,SignalLine)){

exitLong();
    enterShort();
    }
            
}

Posted By: SFF

Re: Trade Tick as default? - 01/05/13 00:32

Oh, I am miss understood.

>> - With 1 min TF, Zorro trades every minute, so 15:19 is fine.

I wanted to say instead.
15:19:08

So Is Zorro trading every second?
Posted By: TankWolf

Re: Trade Tick as default? - 01/07/13 02:17

I'll try to help out here. I think your a bit confused about the run function and TICKS mode. When you set a BarPeriod in your example your using 1 minute, if you are not using a trade management function then trades will only take place at the end of each 1 minute bar if your conditions have been met ie the run function will only occur at the end of each BarPeriod.

If you want your script to trade at the exact second a price or a condition is forfilled then you have to use the TICKS mode and set trade management functions using Entry,Stop,Trail etc (see enterLong() in the manual for further information). This will mean that while using 1 minute bars for your data if your entry conditions are met during the bar the trade management function will enterLong or Short at the exact tick/second the condition is met.

Hope this helps.
Posted By: jcl

Re: Trade Tick as default? - 01/07/13 10:19

Some additional information: Even when a trade signal occurs at exactly 15:19:00, it can take several seconds until the trade is executed and execution is reported back to Zorro. This delay depends on your Internet connection and the location of the server. We've never experienced a delay of more than 2 seconds, but we've heard of more than 10 seconds from other users. So the 8 seconds in your example can be normal.

Another reason why a trade is not executed exactly at the minute change is using an Entry limit.
Posted By: SFF

Re: Trade Tick as default? - 01/07/13 10:37

Thank you for explaining TankWold and JCL.

A delay can be happened.
I have not use yet trade management functions and TICK mode and will test them soon.

By the way please look at #414564 post.
I really don't understand the result to be shown.
Posted By: jcl

Re: Trade Tick as default? - 01/07/13 11:19

If you mean the system you posted here: it can not trade. There are just not yet enough price bars in 2013 to fill the LookBack period.

Set the start date to 2012, or if you want only to trade in 2013, set it to 20121231, i.e. 2012 December 31. Then the LookBack period is taken from December 2012 and trading starts in 2013.

For this you'll need the recent price history that we uploaded to the Zorro download page. The price history that came with version 1.04 ends in November 2012.
© 2024 lite-C Forums