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
3 registered members (AndrewAMD, Nymphodora, Quad), 923 guests, and 5 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: Special Bars Script [Re: danatrader] #481867
11/09/20 22:14
11/09/20 22:14
Joined: Mar 2019
Posts: 357
D
danatrader Offline OP
Senior Member
danatrader  Offline OP
Senior Member
D

Joined: Mar 2019
Posts: 357
To be honest, I don't know much, but I would suggest you, to start with the workshops and buy the black book.
Start with something easy, the special bars are really nice, cause based on renko you can create awesome strategies with really good returns.

But Zorro is Zorro and has all the advantages a scripting based tool brings.
Sadly, those advantages come with not being graphical.


I would love to rebuild my SC strategy here too, just I am missing the dev skills, so, move on to easier returns...

Last edited by danatrader; 11/09/20 22:45.
Re: Special Bars Script [Re: danatrader] #481895
11/16/20 10:16
11/16/20 10:16
Joined: Mar 2017
Posts: 23
A
atr Offline
Newbie
atr  Offline
Newbie
A

Joined: Mar 2017
Posts: 23
Thank you for your kindness. In my opinion Zorro is a powerfull and a good development tool. I don't understand why is so difficult to perform a simple algo like this one in the SpecialBars.c script. The answer should be very simple...



vars Closes = series(priceClose());
if(Closes[0]<Closes[1] and NumOpenLong<1)
{
enterLong();
}

if(Closes[0]>Closes[1] and NumOpenShort<1)
{
enterShort();
}

Re: Special Bars Script [Re: danatrader] #481897
11/16/20 13:49
11/16/20 13:49
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
You must declare a static series and shift it by script at any bar end. That's how the multiasset renko system is supposed to work.

Alternatively, use the current beta version. It has a new function for shifting dynamic series at the end of a special bar. Then you need not declare static series and can use normal strategies without much adaption.

Re: Special Bars Script [Re: danatrader] #481898
11/16/20 14:28
11/16/20 14:28
Joined: Mar 2019
Posts: 357
D
danatrader Offline OP
Senior Member
danatrader  Offline OP
Senior Member
D

Joined: Mar 2019
Posts: 357
http://manual.zorro-trader.com/shift
shiftSeries (int Filter)

?

Last edited by danatrader; 11/16/20 14:28.
Re: Special Bars Script [Re: jcl] #481899
11/16/20 14:36
11/16/20 14:36
Joined: Mar 2017
Posts: 23
A
atr Offline
Newbie
atr  Offline
Newbie
A

Joined: Mar 2017
Posts: 23
Thank you for your answer. I am trying the current beta version 2.33.6b. Which is the new function you mentioned for shifting dynamic series? Maybe the function shiftSeries() ?
In any case, could you put some code as an example in the SpecialBars.c script? It would be very useful for beginners like me.
Thanks a lot.

Re: Special Bars Script [Re: danatrader] #481903
11/17/20 10:58
11/17/20 10:58
Joined: Mar 2017
Posts: 23
A
atr Offline
Newbie
atr  Offline
Newbie
A

Joined: Mar 2017
Posts: 23
I tried with shitSeries(int Filter) in the current beta version 2.33.6b and didn't work...

void run()
{
BarPeriod = 1; // determines here the time resolution of the bar
StartDate = 20180601;
EndDate = 20180901;
LookBack = 0;
set(PLOTNOW);

while(asset(loop("EUR/USD","GBP/USD")))
{
_bar = Renko1;

vars O = series(priceOpen(),-LookBack), // series must be static here
H = series(priceHigh(),-LookBack),
L = series(priceLow(),-LookBack),
C = series(priceClose(),-LookBack);
if(nextBar(O,H,L,C)) {
// ... perform the algorithm. Use only static series.
// Do not use indicators that internally create series.

vars Closes = series(priceClose());
shiftSeries(3);
if(Closes[0]<Closes[1] and NumOpenLong<1)

{
enterLong();
}


if(Closes[0]>Closes[1] and NumOpenShort<1)

{
enterShort();
}


printf("#\nNew Bar");
}
plot("Renko",C,LINE,RED);
}
}
#endif[color:#FF6600][/color]

Re: Special Bars Script [Re: danatrader] #481933
11/23/20 10:07
11/23/20 10:07
Joined: Mar 2017
Posts: 23
A
atr Offline
Newbie
atr  Offline
Newbie
A

Joined: Mar 2017
Posts: 23
I tried the NOSHIFT flag with the beta Zorro version 2.33.8b and didn't work. NOSHIFT is supposed to control shift dynamic series... Any ideas?


void run()
{
BarPeriod = 1; // determines here the time resolution of the bar
StartDate = 20180601;
EndDate = 20180901;
LookBack = 0;
set(PLOTNOW,NOSHIFT,TICKS);

while(asset(loop("EUR/USD","GBP/USD")))
{
_bar = Renko1;

vars O = series(priceOpen(),-LookBack), // series must be static here
H = series(priceHigh(),-LookBack),
L = series(priceLow(),-LookBack),
C = series(priceClose(),-LookBack);
if(nextBar(O,H,L,C)) {
// ... perform the algorithm. Use only static series.
// Do not use indicators that internally create series.

vars Closes = series(priceClose());

if(Closes[0]<Closes[1] and NumOpenLong<1)

{
enterLong();
}


if(Closes[0]>Closes[1] and NumOpenShort<1)

{
enterShort();
}

printf("#\nNew Bar");
}
plot("Renko",C,LINE,RED);
}
}[color:#FF6666][/color]

Last edited by atr; 11/23/20 10:07.
Re: Special Bars Script [Re: danatrader] #481936
11/24/20 08:11
11/24/20 08:11
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
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.

Page 2 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1