Gamestudio Links
Zorro Links
Newest Posts
Any Old Timers Still Around?
by pyramide. 08/24/19 18:23
Script filename
by MatPed. 08/24/19 17:18
Oanda FIFO issue?
by AndrewAMD. 08/24/19 12:10
IG plugin initial release
by Dalla. 08/24/19 06:06
Tutorial for Vector Graphics
by Dooley. 08/23/19 22:32
Issue with dataParse function
by byakuren81. 08/23/19 21:57
Multiplayer subscription
by Truth. 08/23/19 20:08
candle pattern on weekly bars
by AndrewAMD. 08/23/19 13:20
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 (pyramide, 3run, AndrewAMD, MatPed, byakuren81, Realspawn, 2 invisible), 644 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Ysbail, trader4321, GorgonzolaBYTE, Southqvist, tawin
18272 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: 8
D
danatrader Offline OP
Newbie
danatrader  Offline OP
Newbie
D

Joined: Mar 2019
Posts: 8
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: 162
Czech Republic
Grat Offline
Member
Grat  Offline
Member

Joined: May 2015
Posts: 162
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: 26,996
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 26,996
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: 8
D
danatrader Offline OP
Newbie
danatrader  Offline OP
Newbie
D

Joined: Mar 2019
Posts: 8
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: 8
D
danatrader Offline OP
Newbie
danatrader  Offline OP
Newbie
D

Joined: Mar 2019
Posts: 8
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: 162
Czech Republic
Grat Offline
Member
Grat  Offline
Member

Joined: May 2015
Posts: 162
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