Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 636 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
rising | falling? #423939
06/08/13 13:17
06/08/13 13:17
Joined: Apr 2013
Posts: 107
UK
G
Geek Offline OP
Member
Geek  Offline OP
Member
G

Joined: Apr 2013
Posts: 107
UK
I have read about "rising | falling" in the manual but there is not an example code to go by.....

Basically how would I go about implementing this for the below?


Quote:
If (RSI(Close,14) > 70 | < 75 && the RSI value has been falling when the RSI(Close,14) was > 80.
enterShort();


Is this possible jcl?

As to me this would indicate the RSI value has peaked from 80 and is now maybe on it's way down ...so a signal for a short.. As sometimes when just using > RSI 70 the underling trend could mean it has not peaked and could be on it's way to > RSI 90..

Thanks.


Last edited by Geek; 06/08/13 13:53.
Re: rising | falling? [Re: Geek] #424117
06/10/13 18:15
06/10/13 18:15
Joined: Apr 2013
Posts: 107
UK
G
Geek Offline OP
Member
Geek  Offline OP
Member
G

Joined: Apr 2013
Posts: 107
UK
Here is my follow up attempt but I don't think it works. Still learning.


bool rising = series(RSI(Close,14));

bool falling = series(RSI(Close,14));

//////////////////////////////////////////

&& RSI(Close,14) < 30 && rising)

&& RSI(Close,14) > 70 && falling)

Re: rising | falling? [Re: Geek] #424124
06/10/13 19:41
06/10/13 19:41
Joined: May 2013
Posts: 245
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
geek,

have a look at the syntax for peak and valley in workshop tutorial 4.

the syntax is the same, but I think you are looking for peak.

Re: rising | falling? [Re: swingtraderkk] #424131
06/10/13 23:22
06/10/13 23:22
Joined: Apr 2013
Posts: 107
UK
G
Geek Offline OP
Member
Geek  Offline OP
Member
G

Joined: Apr 2013
Posts: 107
UK
Thanks,

Yes, I have already implemented peak and valley using the lowpass filter in previous script learning but surely this is not the same as rising, falling for a indicator value as described in my 1st post? Then again, maybe it is? But then why have rising and falling in the manual if so?









Last edited by Geek; 06/10/13 23:36.
Re: rising | falling? [Re: Geek] #424140
06/11/13 08:21
06/11/13 08:21
Joined: May 2013
Posts: 245
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
my point is that the syntax is the same.

Re: rising | falling? [Re: swingtraderkk] #424148
06/11/13 09:27
06/11/13 09:27
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Here's the missing example:

Code:
function run()
{
  ...
  vars Price = series(price());
  if(rising(Price)) 
    enterLong();
  else if(falling(Price))
    enterShort();
}


Re: rising | falling? [Re: jcl] #424150
06/11/13 09:38
06/11/13 09:38
Joined: Apr 2013
Posts: 107
UK
G
Geek Offline OP
Member
Geek  Offline OP
Member
G

Joined: Apr 2013
Posts: 107
UK
Ok, I get it, thanks swingtraderkk and also jcl for the missing example.
Appreciated.

Re: rising | falling? [Re: Geek] #424155
06/11/13 10:52
06/11/13 10:52
Joined: May 2013
Posts: 245
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
jcl,

how do peak, valley, rising falling work?

Clearly they compare the current value in the series to previous values, but to how many previous values, and is there any smoothing or other processing techniques applied?

Re: rising | falling? [Re: swingtraderkk] #424156
06/11/13 11:24
06/11/13 11:24
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
No, they just compare the last 2 resp. 3 values. For smoothing the series should be used, not the comparison functions.


Moderated by  Petra 

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