Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 10/13/26 17:08
Alternative to Stooq for Zorro S
by cwford. 10/09/26 21:13
Stooq now requires an API key
by cwford. 10/08/26 23:27
Purchase A8 full licence version
by jcl. 10/05/26 12:12
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, VoroneTZ, mistery), 20,589 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Trade Management - Help Please #475056
11/20/18 21:06
11/20/18 21:06
Joined: Nov 2018
Posts: 4
C
ChrisCZZZ Offline OP
Guest
ChrisCZZZ  Offline OP
Guest
C

Joined: Nov 2018
Posts: 4
Hi everyone,

I am a newbie on Zorro..

Have been playing around for a while - I wrote a script and am currently doing a live trading test.

My trade logic involves two indicators crossing over/under each other to generate trade signals and I realize that Zorro always places its first trade that doesn't really make sense. I believe it is becasue when Zorro starts running, it immediately places a trade according to which indicator is above/under the other.

Is there a way/function that can help me skip the first trade of the simulation?

Thanks a lot everyone.

Re: Trade Management - Help Please [Re: ChrisCZZZ] #475057
11/20/18 22:10
11/20/18 22:10
Joined: Feb 2017
Posts: 1,835
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,835
Chicago
That does not sound right. Can you post your script?

Re: Trade Management - Help Please [Re: AndrewAMD] #475058
11/20/18 22:39
11/20/18 22:39
Joined: Nov 2018
Posts: 4
C
ChrisCZZZ Offline OP
Guest
ChrisCZZZ  Offline OP
Guest
C

Joined: Nov 2018
Posts: 4
Hi AndrewAMD,

Thank you so much for your reply. Script is as simple as the following. The problem is, I would expect a trade to be entered once PSAR flips above price, or flips below. However, whenever I start the script, a trade is entered. So I assume the first bar Zorro reads is either above or below PSAR, so that's why Zorro does a trade?

function tradereversetrend()
{

TimeFrame = 1;

vars Price = series(priceClose());
vars parasar = series(SAR(0.02,0.02,0.2));


if (ATR(5)>0.75){
if(crossOver(Price,parasar))
enterLong();
if(crossUnder(Price,parasar))
enterShort();
}
}

Re: Trade Management - Help Please [Re: ChrisCZZZ] #475087
11/22/18 08:10
11/22/18 08:10
Joined: Jul 2000
Posts: 28,140
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,140
Frankfurt
The script looks ok. It trades only when SAR swaps direction, so the trade on live start was probably just coincidence.

You can generally solve such problems by printing the SAR in the log or plotting it on the chart - then you can see when and why it trades.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1