Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, Nymphodora), 1,012 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: New to Zorro and getting tripped up on some fundamental things [Re: ShawnM] #487275
03/01/23 20:12
03/01/23 20:12
Joined: Feb 2023
Posts: 10
S
ShawnM Offline OP
Newbie
ShawnM  Offline OP
Newbie
S

Joined: Feb 2023
Posts: 10
That is my only script Petra... that's what makes it so puzzling.

Re: New to Zorro and getting tripped up on some fundamental things [Re: ShawnM] #487277
03/02/23 09:01
03/02/23 09:01
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Ok, but this script does not trail, as far as I see. Please set LOGFILE and run this script in Test mode. Then go through the log and let me know if you see a "Trail" message anywhere. If so, please post that part of the log. Make also sure that you have the recent Zorro version.

Re: New to Zorro and getting tripped up on some fundamental things [Re: ShawnM] #487293
03/05/23 22:10
03/05/23 22:10
Joined: Feb 2023
Posts: 10
S
ShawnM Offline OP
Newbie
ShawnM  Offline OP
Newbie
S

Joined: Feb 2023
Posts: 10
Sorry Petra, I mistakenly sent you the code of my very first "original" script before my few changes advised by user NSG. My very latest script is logically not much different and is the following:


Code
function run() 
{	
   set(LOGFILE);
   BarMode = BR_MARKET;
   //StartDate = 20221012;
   //EndDate = 20221013;	
	
   StartDate = 20221122;
   EndDate = 20221123;

   StartMarket = 1430; // 9:30am EST
   EndMarket = 2200;   // 5:00pm EST
   
   MaxLong = 1;
   Fill = 0;
   Slippage = 0;
   Penalty = 0;
   Stop = 10*PIP;
   TakeProfit = 20*PIP;

   BarPeriod = 5;
   asset("US30");
   //vars Prices = series(price());
	
   var r = random();
   if (r >= .60) enterLong();
}



...this was the version of the script that produced the mysterious "Trail" in the logfile, which I show in my post #487262 to user NSG (also in that post is part of the logfile, as you requested. I have attached the full logfile also). Nowhere in the above script do I move my stoploss or my profit target - they are static.

Thanks!
ShawnM

P.S: There are actually 2 instances of this "trail" occurrence in the logfile. Also my version of Zorro is 2.53.9. I just downloaded it and installed it about a week ago.

Attached Files
MyCont1Test_test.log (28 downloads)
Re: New to Zorro and getting tripped up on some fundamental things [Re: ShawnM] #487303
03/07/23 11:11
03/07/23 11:11
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
Yes, this one trails. You're updating the stop with MaxLong.

You can find the MaxLong description in the manual, but in short, if you only want to limit the trades without updating the open trades, set MaxLong to -1.

https://zorro-project.com/manual/en/log.htm


Re: New to Zorro and getting tripped up on some fundamental things [Re: Petra] #487316
03/09/23 20:38
03/09/23 20:38
Joined: Feb 2023
Posts: 10
S
ShawnM Offline OP
Newbie
ShawnM  Offline OP
Newbie
S

Joined: Feb 2023
Posts: 10
Ah that fixed it, thank you so much Petra! I was under the impression that MaxLong simply put a limit on the number of allowed open positions...

Thanks!

Page 2 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1