Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,038 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Proper Stoch indicator usage #430148
09/24/13 18:23
09/24/13 18:23
Joined: Jun 2013
Posts: 41
Ohio, USA
P
Pork Offline OP
Newbie
Pork  Offline OP
Newbie
P

Joined: Jun 2013
Posts: 41
Ohio, USA
The manual says Stoch(int FastK_Period, int SlowK_Period, int SlowK_MAType, int SlowD_Period, int SlowD_MAType)....
Uses the current asset price series. Returns: rSlowK, rSlowD.
If I create a price series like so:
vars Sto=series(Stoch(5,3,MAType_SMA,3,MAType_SMA));
what does s equal if I say:
s=Sto[0]
do i get the rSlowK or the rSlowD or are they retrieved another way?
Thanks
P

Re: Proper Stoch indicator usage [Re: Pork] #430154
09/24/13 19:39
09/24/13 19:39
Joined: May 2013
Posts: 245
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
Pork,

call stoch and create a series out of the returned rSlowK & rSlowD

Code:
Stoch(5,3,MAType_SMA,3,MAType_SMA);

vars k = series(rSlowK);
vars d = series(rSlowD);


Re: Proper Stoch indicator usage [Re: swingtraderkk] #430156
09/24/13 20:31
09/24/13 20:31
Joined: Nov 2012
Posts: 126
B
blaub4r Offline
Member
blaub4r  Offline
Member
B

Joined: Nov 2012
Posts: 126
Do what swingtraderkk says.
The Stoch function seems to have no return value hence your code should not work anyway.
rSlowK and rSlowD are global variables which are manipulated by the Stoch function.

Re: Proper Stoch indicator usage [Re: blaub4r] #430184
09/25/13 10:46
09/25/13 10:46
Joined: Jun 2013
Posts: 41
Ohio, USA
P
Pork Offline OP
Newbie
Pork  Offline OP
Newbie
P

Joined: Jun 2013
Posts: 41
Ohio, USA
Great Thanks for the help!
@blaub4r Stoch does seem to return something when I use it, but it wasn't what I expected. So this should explain that issue.
P


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1