Gamestudio Links
Zorro Links
Newest Posts
'AssetFrameZone' undeclared identifier
by AndrewAMD. 12/09/22 13:40
How to combile shader FX?
by NicolaB. 12/08/22 08:18
Function refresh?
by Quad. 12/07/22 20:56
AUM Magazine
Latest Screens
DEAD TASTE
Tactics of World War I
Hecknex World
Scheherazade's Journey
Who's Online Now
2 registered members (PeroPero, Grant), 558 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
pythno, rxs, wezcam, juliastratos, DavidK
18872 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: 9
Singapore
V
vinitrinh Offline OP
Newbie
vinitrinh  Offline OP
Newbie
V

Joined: Apr 2022
Posts: 9
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: 924
Spirit Offline

Moderator
Spirit  Offline

Moderator

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


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1