Gamestudio Links
Zorro Links
Newest Posts
IBKR datasave problem
by NewbieZorro. 06/11/25 15:11
Marking Exit trades
by jcl. 06/11/25 14:02
SGT_FW
by Aku_Aku. 06/02/25 17:54
The Perfect Adventure Game
by tian. 05/27/25 04:32
ADX values
by Yogpot. 05/25/25 15:11
Transfer of Lots between Algos?
by Jack_Zodiac. 05/25/25 09:30
AUM Magazine
Latest Screens
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Zeal-X2
Who's Online Now
2 registered members (Quad, Ayumi), 451 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
WardyJoubertIII, NewbieZorro, Squarei, tian, Yogpot
19139 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Using T6 Price Instead of Broker Price #488649
03/11/25 16:03
03/11/25 16:03
Joined: Apr 2023
Posts: 56
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

Joined: Apr 2023
Posts: 56
I use the MT5 bridge to connect Zorro to MT5. Zorro will load the historical price from MT5 and trade using this price.

I am wondering, is there a way for Zorro to use my own historical t6 price to live trade, instead of using broker's MT5 price?

The manual recommend "Preload" but it seems this only applies at the start of the session, whereas I would like Zorro to use t6 price throughout the live trade, just like in backtest mode.

Re: Using T6 Price Instead of Broker Price [Re: vicknick] #488650
03/11/25 16:33
03/11/25 16:33
Joined: Feb 2017
Posts: 1,790
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,790
Chicago
T6 is historical data. How did you expect to source T6 data when it is no longer historical?

Perhaps you’re asking the wrong question. Rather, what data did you plan on using using in a live trading setting, streaming data? Which data from which provider?

Re: Using T6 Price Instead of Broker Price [Re: AndrewAMD] #488651
03/12/25 01:00
03/12/25 01:00
Joined: Apr 2023
Posts: 56
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

Joined: Apr 2023
Posts: 56
I have my own csv file which is updated daily. This csv is then converted to T6 file daily as well. Zorro will then use this latest T6 file to conduct the latest analysis.

Or perhaps there's no need to convert to T6, instead Zorro can directly use the csv? Is it possible in live trading?

Re: Using T6 Price Instead of Broker Price [Re: vicknick] #488652
03/12/25 12:39
03/12/25 12:39
Joined: Jul 2000
Posts: 28,020
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,020
Frankfurt
If you only need a daily price and update the CSV daily, then let Zorro just read the price from the CSV instead of using the price() functions.

Re: Using T6 Price Instead of Broker Price [Re: vicknick] #488656
03/13/25 15:14
03/13/25 15:14
Joined: Apr 2023
Posts: 56
V
vicknick Offline OP
Junior Member
vicknick  Offline OP
Junior Member
V

Joined: Apr 2023
Posts: 56
So far I have managed to load my data from my own csv into the series:
Code
function run()
{
	set(LOGFILE);
	set(PRELOAD);

	while(asset(loop("6A_M", "6B_M", "6C_M")))
	{
		string AssetName = (string)Asset;
		 string FilePath = strf("C:\\Users\\chu_h\\Desktop\\output\\%s_Meod.csv", AssetName);
		 string setup = file_content(FilePath);
		 if (!setup) {
			  printf("#Error: File not found or empty for %s\n", AssetName);
			  return;
		 }
		 
		 vars CloseSeries = series(0, 1000);
		 var ClosePriceList[1000]; 
                 ......


However, Zorro try to find the 6A_M historical file when running the script:

Code
Error 047: 6A_M no 2020 history (History\6A_M_2020.t6)
Error 047: 6A_M 2020..2025 no data
Error 047: No bars generated


Is there a way suppress this error, and instead let Zorro follow through my code to use my csv data? I tried with PRELOAD but it still have the error.

Re: Using T6 Price Instead of Broker Price [Re: vicknick] #488658
03/14/25 11:39
03/14/25 11:39
Joined: Feb 2017
Posts: 1,790
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,790
Chicago
There are many problems here.
1) Are you running in [Test], [Train], or [Trade] mode? Did you account for how the code operates in each mode? Should you be using run() or main() in this case, and why?
2) Unless "6A_M", "6B_M", and "6C_M" are actually assets in your asset list with existing T6 historical data, this code is wrong. Lose the asset() call and consider using of() instead of loop(). of() can be used to set a string.
3) I see you are loading a CSV file, but I do not see your code actually doing anything with the loaded file. You're not even parsing it into a dataset, so I'm not sure what you expected here.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1