Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, AndrewAMD), 438 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Count cross #467070
07/14/17 10:44
07/14/17 10:44
Joined: Jul 2017
Posts: 22
Mongolio
T
tuuguu777 Offline OP
Newbie
tuuguu777  Offline OP
Newbie
T

Joined: Jul 2017
Posts: 22
Mongolio
How to count price crosses any line?

Re: Count cross [Re: tuuguu777] #467073
07/14/17 14:42
07/14/17 14:42
Joined: Jun 2017
Posts: 78
B
BobbyT Offline
Junior Member
BobbyT  Offline
Junior Member
B

Joined: Jun 2017
Posts: 78
Take a look at crossUnder and crossOver functions

If you want to count them in the past you will also want Bar() too

cheers,
BobbyT

Re: Count cross [Re: BobbyT] #467084
07/15/17 03:04
07/15/17 03:04
Joined: Jul 2017
Posts: 22
Mongolio
T
tuuguu777 Offline OP
Newbie
tuuguu777  Offline OP
Newbie
T

Joined: Jul 2017
Posts: 22
Mongolio
thank you for your advise

Re: Count cross [Re: BobbyT] #467085
07/15/17 03:23
07/15/17 03:23
Joined: Jul 2017
Posts: 22
Mongolio
T
tuuguu777 Offline OP
Newbie
tuuguu777  Offline OP
Newbie
T

Joined: Jul 2017
Posts: 22
Mongolio
i think bar() function can't count that price crosses any line.

Re: Count cross [Re: tuuguu777] #467088
07/15/17 03:40
07/15/17 03:40
Joined: Jun 2017
Posts: 78
B
BobbyT Offline
Junior Member
BobbyT  Offline
Junior Member
B

Joined: Jun 2017
Posts: 78
You're absolutely right. It counts bars. So use the value of Bar() to loop over bars in the past and count each time an event occurs.

Unless there is a special function for such a thing that's how I would do it.

Cheers,
BobbyT

EDIT: C, like many languages is case sensitive. Bar() != bar()

Last edited by BobbyT; 07/15/17 03:41.
Re: Count cross [Re: BobbyT] #467090
07/15/17 03:50
07/15/17 03:50
Joined: Jul 2017
Posts: 22
Mongolio
T
tuuguu777 Offline OP
Newbie
tuuguu777  Offline OP
Newbie
T

Joined: Jul 2017
Posts: 22
Mongolio
is it possible to chat with you through any social chat app?

Re: Count cross [Re: tuuguu777] #467091
07/15/17 03:54
07/15/17 03:54
Joined: Jun 2017
Posts: 78
B
BobbyT Offline
Junior Member
BobbyT  Offline
Junior Member
B

Joined: Jun 2017
Posts: 78
I'm not on any social netwonking sites. But if you post some code I'd be glad to try and help further.

Cheers,
BobbyT

Re: Count cross [Re: BobbyT] #467092
07/15/17 04:02
07/15/17 04:02
Joined: Jul 2017
Posts: 22
Mongolio
T
tuuguu777 Offline OP
Newbie
tuuguu777  Offline OP
Newbie
T

Joined: Jul 2017
Posts: 22
Mongolio
How to write code that price crosses first time upper bollinger band line. Actually there many crosses upper bollinger band line. I need the first cross.

Re: Count cross [Re: tuuguu777] #467093
07/15/17 04:23
07/15/17 04:23
Joined: Jun 2017
Posts: 78
B
BobbyT Offline
Junior Member
BobbyT  Offline
Junior Member
B

Joined: Jun 2017
Posts: 78
It needs to be relative to some other event otherwise you will just get the first cross in the simulation period.

Cheers,
BobbyT

Re: Count cross [Re: BobbyT] #467094
07/15/17 04:29
07/15/17 04:29
Joined: Jul 2017
Posts: 22
Mongolio
T
tuuguu777 Offline OP
Newbie
tuuguu777  Offline OP
Newbie
T

Joined: Jul 2017
Posts: 22
Mongolio
Can you write code about it? I think it is easy for you.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1