Gamestudio Links
Zorro Links
Newest Posts
Stop on path, then resume
by Karakis. 11/29/20 07:59
DirectX : 3d Hardware Reset Failure
by jumpman. 11/28/20 18:28
Optimizing global & local parameters
by dBc. 11/28/20 14:56
Binance Futures Plugin
by OptimusPrime. 11/27/20 17:03
Sortino(vars Data, int TimePeriod): var
by danatrader. 11/26/20 20:45
Need code for Williams Sentiment Index
by danatrader. 11/26/20 20:42
AUM Magazine
Latest Screens
Paradox Vector
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
Who's Online Now
2 registered members (3run, Karakis), 486 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
MMK, raed, liquidbread, Dmitry_Shesterin, ddczp
18543 Registered Users
Active Threads | Active Posts | Unanswered Today | Since Yesterday | This Week
Starting with Gamestudio
1 hour ago
Is it possible to make an ai stop at a terminal or other location for a specified amount of time before proceeding to the next node?
0 6 Read More
The Z Systems
3 hours ago
Thanks for this @jcl!
2 139 Read More
Atari lite-C
Yesterday at 18:28
I noticed the same thing too with video_set! Emre, to me this is very elegant and simpler code, thank you.

It currently works without hitch/error on my desktop, so I'm going to be testing it on my laptop and post the results here today.
7 149 Read More
Starting with Zorro
Yesterday at 14:56
Thank you JCL, for your reply.

Please pay attention that there is ONE global parameter, so if I use your suggestion - no parameters train would take place.

function run()

	BarPeriod    = 1440;
	StartDate    = 2010;
	LookBack     = 1000;
	Verbose      = 7;

	int Max_Long_Assets = optimize(2,1,4,1);
//	int Max_Long_Assets = 2;

	while(asset(loop(Assets))) {
		vars Prices     = series(price());
		var  sma5       = ROC(Prices,5);
		var signal1     = SMA(Prices,5);
		var signal2     = SMA(Prices,30);
		var Threshold1  = optimize(0.05,0.0,0.1,0.01);
		var Threshold2  = optimize(0.05,0.0,0.1,0.01);
		int RR  = signal1 - signal2 <  Threshold1;
		int TT  = signal1 - signal2 >= Threshold2;
//		printf("\n%.3f %.3f",sma5,signal1 - signal2);
		int In = (sma5<0 && RR==1) || (sma5>0 && TT==1);
		int Out= (sma5>0 && RR==1) || (sma5<0 && TT==1);
		int NewShares = Balance/priceClose(0)/Max_Long_Assets-LotsPool;
		if(In && NumLongTotal < Max_Long_Assets)
		else if (Out)
//	plot("TT",signal1 - signal2,NEW|LINE,RED);

Zorro's train run results:


XLV history up to date
XLV 3967 ticks read
Loop[8] p1 step  1:  0.00 => 0.00   0/ 0

Loop[8] p2 step  1:  0.00 => 0.00   0/ 0

XLV: 0.050 0.050=> 0.000

Parameters stored in David.par

If I disable the global parameter, then the train works OK


//	int Max_Long_Assets = optimize(2,1,4,1);
	int Max_Long_Assets = 2;  // No global parameter

Loop[8] p2 step  7:  0.06 => 0.72  460/651
Loop[8] p2 step  8:  0.07 => 0.72  461/649
Loop[8] p2 step  9:  0.08 => 0.72  459/649
Loop[8] p2 step 10:  0.09 => 0.73  460/646
Loop[8] p2 step 11:  0.10 => 0.73  458/645
Selected p2[9] = 0.080  => 0.73

XLV: 0.070 0.080=> 0.723

Parameters stored in David.par

The only way I succeeded to optimize ONE global and TWO local parameters , is using "listed_assets", but it works for 7 assets only.
4 231 Read More
Starting with Zorro
Yesterday at 10:32
1 70 Read More
Bug Hunt
Yesterday at 09:55
In that case, yes. But the error handler is not so intelligent to make a difference in which situation continuing makes sense and in which not. A failed file access is normally a hard and fatal error and leads to stopping the system. If the system would continue trading with an unread file, the result can be much worse.
6 72 Read More
Ask the Developers
Yesterday at 01:06
Hi Emre, thanks for linking your solution. Here is what I've done so far, with advice and code snippets from both of you.

It currently isnt working 100%, but here is the major parts of the code that I believe help a lot, I think it completely got rid of the 3d Hardware Reset failure crash when waking up from a screensaver:

#include <windows.h>  //----------include windows.h


function main()

var render_chain_destroy=0;
var render_chain_state=0;

while(1) ///--------------------put this in your main loop

BOOL bSaver;  //--------------------------------creates a BOOL flag that will be changed by the windows.h function SystemParametersInfo
SystemParametersInfo(114,0,&bSaver,0);  //---------114 is a specific parameter that tells gamestudio whether or not a screensaver is running


        //---------If bSaver is 1/true then it means the windows screensaver is running:

	if((bSaver)||(window_focus==0))  //-----------bSaver is a flag set by SystemParametersInfo above. I put window_focus in here as well 

   render_chain_destroy=1;  //-------get ready to destroy the render chain



      render_chain_destroy=0;  //-------if the screen saver isnt running, dont destroy the render chain


if(render_chain_destroy==1)  //-----we are ready to destroy the render chain because the screensaver is on


destroy_render_chain();  //-------put your render chain destruction here (remove stages, remove bmaps, purge bmaps
render_chain_state=1;  //-----destroy the chain once


if(render_chain_destroy==0)  //-------if the system doesnt have a screensaver running

if(render_chain_state==1) //------and we recently destroyed the render chain because we destroyed it when a screensaver came on before
recreate_render_chain(); //--------recreate your render chain here
wait(-2); //------------I waited 2 seconds here, not sure if this helps or not
render_chain_state=0;  //-------we reset this var to 0, which is only set to 1 when a screensaver is on.



There some caveats to the above screensaver code. It only consistently works if gamestudio is running in a window. Obviously, if gamestudio is full screen, the screensaver will never trigger.

But lets work on the next hurdle. Locking your computer.

if (DeskHwnd != 0)
DesktopResult = SwitchDesktop(DeskHwnd);


With Emre's code, I can get gamestudio to recognize when the computer is locked! I destroy the render chain and remove the stages the moment gamestudio detects a lock.

However, when you log back in to a running windowed gamestudio exe, the game gave me a "cant create texture unnamed", but it didnt crash the game. When you select OK, the game seems to run ok in windowed mode after.

If you run the game in fullscreen, then lock, destroy the render chain in gamestudio, then log back in, the game looks like its frozen, however if you press alt+enter, the game seems to unfreeze and start working again.

Emre, have you tried to see if your game works when you run fullscreen, then lock, then log back into the desktop to see what a running gamestudio does?

Thank you two for your help so far.
4 641 Read More
Zorro and the Brokers
11/27/20 17:03
Hi Mio: Yes, please.
1 52 Read More
11/27/20 07:59
Hi Preypacer,

I started with the motor in the A5 version and I have to say that it is simply great for people who mainly want to be programmers.
But that is also the problem at the same time. You have to grasp the programming code, i.e. master a programming language.

You mustn't compare this engine to Unreal or Unity.. These primarily rely on visual design, but 3d Gamestudio is primarily a script / code-based design engine.
for one it's an advantage, for the other it's a disadvantage. Of course you have to be able to program in Unreal or Unity in the end to design games, but the connection between the GUI and the Motor Code is more directly linked.

At 3d Gamestudio you only have the blank SED editor at first. If you don't know what you have to or want to do here, it is of course difficult to develop a game with it. As @Dooley wrote, the approach is simply totally different and very directly.

So here is the first question to ask yourself. what do you like are you the coder or the designer.
If you are more of a designer and want to work visually, 3d Gamestudio is not for you and you should look for a different engine.
But if you are a real scripting pure code writer, then 3D Gemstudio is for you :-D

3D Gamestudio is a software package collection. The 3dGS tools like WED, GED and MED unfortunately only support programs. In Fahl von MED, any other modern 3D modeling tool is better, but you will need it to convert models to MDL format as 3dGS cannot work directly with FBX or other models. In theory, you don't need a single tool from 3dGS to program a game, just acknex.exe (Engine) itself.

If 3d Gamestudio can directly use FBX models in the A9 version (hopefully the upcoming version), this will in my opinion be enough to actively play in the Motor League of the greats again.

If you are still interested in 3dGS you can ask any of us about help and I think everyone will be happy to help.
Search also in YouTube for 3D Gamestudio or 3dGS and you will surely find something useful in English.

If you haven't worked with 3d Gamestudio at all, take a look at my youtube channel here:
It's only in German, unfortunately, but you can use YouTube's automatic subtitle translation to understand at least a little what I'm saying.
My Videos are for total 3dGS beginners and therefore slow enough to be able to understand them all without knowing the German language :-)

I myself am unfortunately not the mega programmer and also not the 3dGS freak, but that is simply because I have too little time for it.

I apologize for my English because I don't speak the language very well
cu Roman
11 386 Read More
The Z Systems
11/26/20 20:49
Warning 054: NAS100 LotAmount 1.0 -> 0.10 <<<---- not so cool, better get the file right, or don't be surprised in the end
Warning 054: US30 LotAmount 1.0 -> 0.10
Warning 054: GER30 LotAmount 1.0 -> 0.10
Warning 054: UK100 LotAmount 1.0 -> 0.10
3 69 Read More
Blame the Manual
11/26/20 20:45
Sortino(vars Data, int TimePeriod): var
Sortino ratio; the mean of the Data series divided by its semi-deviation, i.e. by the standard deviation of Data values below the mean. Source code in indicators.c. <<<---- nope, it is not there, sadly.
0 56 Read More
Zorro Scripts
11/26/20 20:42
Why not look inside indicators.c?
4 120 Read More
Zorro Future
11/25/20 10:55
That's already possible on the Zorro side, but AFAIK not yet supported by plugins.

In stead of 2 simultaneous FOK orders, send 2 AON+GTC orders, wait some predefined time, then check the fill with BrokerTrade and send a DO_CANCEL command when not filled.

This requires from the plugin support of GTC, DO_CANCEL, and BrokerTrade.
1 77 Read More
Starting with Zorro
11/25/20 10:47
For simple functions, such as peak/valley, you can find the algorithm in the manual
1 75 Read More
Zorro and the Brokers
11/24/20 10:03
The printed above was for closing price, tried to use priceClose() which shows the same as default on log and compare to the close price of each candle on TWS chart on same one min timeframe.

I found out the pricetype default on IB was bid/ask how do I enforce to use the Last? to match with the IB TWS
2 47 Read More
Bug Hunt
11/24/20 08:36
Ah, ok. You cannot resume trades and stats in test mode. Only in trade mode.
14 278 Read More
Starting with Zorro
11/24/20 08:11
You can use any flag in 3 ways: right way, wrong way, and the Dada way.

The difference between the last two is that when it's the wrong way, one can at least see the intention.
17 470 Read More
Blame the Manual
11/24/20 07:59
Thanks! The dead links will be fixed.
3 100 Read More
Atari lite-C
11/21/20 03:02
I have been able to keep the Nexus at or under 500 in my games. I never tried going over.
1 93 Read More
Zorro Scripts
11/20/20 22:06
Hi Team:
I am having difficulty in live testing with intrabar trades. In testing with historical Tick data, I obtain intrabar trades within the hourly bar. In live trading, the trades are only sent at the beggining of each bar i.e. every hour.

I use History = ".t1" and the TICKS flag is set already. I also changed TickTime from the default values but that made no difference in live trading. Without going so far as changing TimeFrame to 0 every time an intrabar trade is intended, is there any thing I might be missing?

I have tried changing all orders to Limit Orders by using OrderLimit and even extending OrderDuration to high values.

Just looking for pointers. If you can point me in the direction of any setting I might want to try.

0 57 Read More
Zorro Future
11/20/20 18:54
Use enterTrade(). This feature was added to Zorro after I made this request.

Another comparable new feature is the brokerCommand GET_TRADES. It deletes all of your Zorro-side trades and replaces them all with detected trades on the broker plugin. Obviously, your broker plugin must support this feature.
7 1,096 Read More
Zorro Future
11/19/20 11:57
Maybe in better words, traincycle 1 without stoploss finds from 20 parameters 15 profitable, traincycle 2 should be possible to train the SL only for the previously found profitable ones (and omit the the 5 unprofitbale ones, to prevent making them profitable by SL only).
1 108 Read More
Automated Trading
11/19/20 08:00
For cancelling the remainder of an unfilled order, select the trade and set TradeLots = TradeLotsTarget-TradeLots, then exit the trade. This should work at least in theory.
2 137 Read More
Starting with Zorro
11/19/20 07:41
This can happen when the lookback period ends with an incomplete bar. The bars are no duplicates, they have different prices and if you would suppress one of them, the series weren't 100% correct either. But you can use the NOSHIFT flag of the current beta version for this.
2 135 Read More
11/19/20 01:55
Indeed great looking style and congratulations!
5 364 Read More
Page 1 of 3 1 2 3

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at)

Powered by UBB.threads™ PHP Forum Software 7.7.1