Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by 7th_zorro. 04/16/24 13:19
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
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, Aku_Aku, VoroneTZ, 11honza11), 376 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
First call of asset() affects the frequency of the bars #486943
11/22/22 11:19
11/22/22 11:19
Joined: Apr 2022
Posts: 18
Singapore
V
vinitrinh Offline OP
Newbie
vinitrinh  Offline OP
Newbie
V

Joined: Apr 2022
Posts: 18
Singapore
Hello,

The number of bars fed into Zorro changes and depends on the first asset call.

If asset("HK33") precede asset("SPX500"), the printed SPX500 bars last from 0100 UTC to 0830 UTC, otherwise SPX500 bars covers virtually the whole day as it should. (these are OANDA tickers) (images of the printed bars attached) This directly affects my standalone SPX500 trading strategy.

Is this a feature or a mistake?
What are some other implications if we place SPX500 in front, would it affect my algo trading HK33?

I'd like to run a trend following strategy on multiple index tickers as well and keep them into a single script.
Seeing this, should we separate them by instruments then?

Thank you.

Code
#include <profile.c>
#include <CustomIndicators.c>
#include <IndicatorIO.c>

function run() 
{
    // ===========
    // BACKTEST PARAMETERS
    // ===========

    // backtest parameters
	BarPeriod = 60;

    StartDate = 20110421;
    EndDate = 20110428;

    // Spread = 0;
    // Slippage = 0;
    LookBack = 450;
    set(LOGFILE,PLOTNOW); // log all trades
    setf(PlotMode, PL_FINE);

    // instrument parameters
    assetList("AssetsOanda.csv");
    // asset("HK33");
    asset("SPX500");
    
    
    asset("SPX500");
    printf("|%02i/%02i/%02i %02i:%02i| %f | \n", day(),month(),year()%100,hour(),minute(), priceClose());
    asset("HK33");

    // plot the necessary components
	PlotWidth = 800;
}

Attached Files asset_hk33.pngasset_spx.png
Re: First call of asset() affects the frequency of the bars [Re: vinitrinh] #486951
11/28/22 14:48
11/28/22 14:48
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
The manual is your friend.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1