Gamestudio Links
Zorro Links
Newest Posts
Performance report in trade mode
by jcl. 01/18/20 09:25
oldschool fps project
by 3run. 01/14/20 19:15
Question about Clipping
by Dooley. 01/13/20 04:16
Simple backtest for SPX intra weeklies
by interzonez. 01/13/20 03:42
Trojan Agent
by jcl. 01/12/20 08:36
Multiplayer c-script example
by Truth. 01/10/20 19:45
Virtual hedging @OANDA
by jcl. 01/10/20 12:53
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
8 registered members (Dooley, kmerlo, Grat, txesmi, 3run, AndrewAMD, kvm, titanicpiano14), 645 guests, and 14 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Leohermoso, matchristrading, pablomfz, tenrally, TradeOperator
18357 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Beginners Workshop #477602
07/13/19 22:39
07/13/19 22:39
Joined: Mar 2019
Posts: 9
D
danatrader Offline OP
Newbie
danatrader  Offline OP
Newbie
D

Joined: Mar 2019
Posts: 9
I thinking of some simple workshop to extend the workshops included in Zorro.

Well, I really want to learn it myself.

Therefore, I ask for your support.

I create a function for calculating WCL (I know it is included, but to learn it helps I guess, cause it's simple calculation).

function wcl()
{
vars c = series(priceClose());
vars l = series(priceLow());
vars h = series(priceHigh());
vars x = 1;
}


Now, however I want to make the calculation of WCL
https://www.tradesignalonline.com/lexicon/view.aspx?id=Weighted+Close+(WCL)

I get some syntax error: wrong type: e.g. DIV:POINTER:POINTER:POINTER.

So maybe someone could show me the way.

Re: Beginners Workshop [Re: danatrader] #477604
07/14/19 15:33
07/14/19 15:33
Joined: May 2015
Posts: 164
Czech Republic
Grat Online
Member
Grat  Online
Member

Joined: May 2015
Posts: 164
Czech Republic
...from head

Code

var wcl(const int g=1){

   var w=(priceHigh()+priceLow()+g*priceClose())/(2*g);
   return w;
}

//use:

vars wclS=series(wcl(1));



Last edited by Grat; 07/14/19 15:35.
Re: Beginners Workshop [Re: danatrader] #477607
07/15/19 06:29
07/15/19 06:29
Joined: Jul 2000
Posts: 27,091
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,091
Frankfurt
An indicator workshop is a good idea.

Re: Beginners Workshop [Re: danatrader] #477664
07/20/19 07:11
07/20/19 07:11
Joined: Mar 2019
Posts: 9
D
danatrader Offline OP
Newbie
danatrader  Offline OP
Newbie
D

Joined: Mar 2019
Posts: 9
To rephrase, I am a beginner, but I am willing to work hard, so if anyone helps, I will document my learning and compile the process, making Zorro accessible to medium skilled people that just won't give up.

Last edited by danatrader; 07/20/19 07:27.
Re: Beginners Workshop [Re: danatrader] #477665
07/20/19 07:54
07/20/19 07:54
Joined: Mar 2019
Posts: 9
D
danatrader Offline OP
Newbie
danatrader  Offline OP
Newbie
D

Joined: Mar 2019
Posts: 9
So I got something, and I will anyway never use the answers given, otherwise learning effect would be zero, I got soemthing that compiles.
I have no idea if it is correecxt, but it compiles.

function wcl()
{

var weight = 1;
var high = priceHigh();
var low = priceLow();
var close = priceClose();

var calc = high+low+weight*close/(2+weight);
return calc;

vars wclS=series(wcl());

}

Now I want to call the function to visualise what it may or may not calculate.
The function is embedded in Workshop7.

Within the main run() I have

wcl();
plot("WCL",wcl(),0,BLUE);

How would I correctly plot the bars showing the WCL like shown here?
https://zorro-project.com/manual/en/plot.htm

Re: Beginners Workshop [Re: danatrader] #477678
07/21/19 15:10
07/21/19 15:10
Joined: May 2015
Posts: 164
Czech Republic
Grat Online
Member
Grat  Online
Member

Joined: May 2015
Posts: 164
Czech Republic
Hi,

in your code is bug:

function wcl()
{

var weight = 1;
var high = priceHigh();
var low = priceLow();
var close = priceClose();

var calc = high+low+weight*close/(2+weight);
return calc; <--- return var calc

vars wclS=series(wcl()); <- this never going - is after return, this must by in FCE run()

}

your question:
in the FCE run:

set(PLOTNOW);
vars wclS=series(wcl());
..
plot("WCL indi ", wclS, NEW+LINE, BLUE);

or in main window
plot("WCL indi ", wclS, MAIN+LINE, BLUE);


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

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

Powered by UBB.threads™ PHP Forum Software 7.7.1