Register
Log In
Forums
Starting with Zorro
Reset a series to zero
Forums
Calendar
Active Threads
Search
Forum Help
Gamestudio Links
► Features
► Download
► Online Manual
► Online Tutorial
► Free Resources
► F.A.Q.
Zorro Links
► Download
► Online Manual
► Online Tutorial
► Blog
► Support
► What's New?
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
multiple results graph in multi-asset scripts?
by Enivant. 04/14/23 10:16
Big Impact Sound | Experienced Composer looking for projects
by bigimpactsound. 04/13/23 20:07
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
Using Zorro to trade Indian equities using Broker APIs
by AndrewAMD. 04/11/23 14:19
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
Who's Online Now
2 registered members (
Quad
,
AndrewAMD
), 1,007 guests, and 6 spiders.
Key:
Admin
,
Global Mod
,
Mod
Newest Members
rki
,
FranzIII
,
indonesiae
,
The_Judge
,
storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Reset a series to zero
#441869
06/05/14
09:25
06/05/14
09:25
Joined:
Apr 2014
Posts: 482
Sydney, Australia
B
boatman
OP
Senior Member
boatman
OP
Senior Member
B
Joined:
Apr 2014
Posts: 482
Sydney, Australia
Hello
Can anyone tell me how to reset a series to zeroes from inside an if statement? I can't seem to crack it.
Cheers
www.robotwealth.com
Re: Reset a series to zero
[
Re: boatman
]
#441873
06/05/14
09:50
06/05/14
09:50
Joined:
Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619
Junior Member
tolu619
Junior Member
T
Joined:
Jun 2014
Posts: 97
Lagos, Nigeria
Can you post the code you used to initialize the series? And possibly also the line(s) of code where values were assigned to the series
Re: Reset a series to zero
[
Re: tolu619
]
#441876
06/05/14
10:12
06/05/14
10:12
Joined:
Jul 2000
Posts: 27,935
Frankfurt
jcl
Chief Engineer
jcl
Chief Engineer
Joined:
Jul 2000
Posts: 27,935
Frankfurt
Code:
memset(myseries,0,LookBack*sizeof(var));
Re: Reset a series to zero
[
Re: jcl
]
#441904
06/05/14
19:47
06/05/14
19:47
Joined:
Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619
Junior Member
tolu619
Junior Member
T
Joined:
Jun 2014
Posts: 97
Lagos, Nigeria
Hmmm....that has actually confused me. Is myseries an array, a list or what?
Re: Reset a series to zero
[
Re: tolu619
]
#442845
07/04/14
16:37
07/04/14
16:37
Joined:
Apr 2013
Posts: 57
3
3DCat
Junior Member
3DCat
Junior Member
3
Joined:
Apr 2013
Posts: 57
myseries is obviously a series.
@jcl: is it somehow possible to change the value of myseries[n] with memset? n>0? Is that possible at all?
Re: Reset a series to zero
[
Re: 3DCat
]
#442846
07/04/14
16:53
07/04/14
16:53
Joined:
Jul 2000
Posts: 27,935
Frankfurt
jcl
Chief Engineer
jcl
Chief Engineer
Joined:
Jul 2000
Posts: 27,935
Frankfurt
No, memset works only with 0, any other value requires the good old for(...) loop.
Moderated by
Petra
Hop To
Gamestudio ------
Starting with Gamestudio
Atari lite-C
Editors & Templates
A8 Engine
Shaders
Third Party Tools
Acknex Users Magazine
The Past
The Future
Zorro ------
Starting with Zorro
Educational
Automated Trading
Zorro Scripts
The Z Systems
Zorro and the Brokers
Zorro Future
Feedback ------
Bug Hunt
Blame the Manual
Ask the Developers
Updates & Announcements
Rants
Game Creation ------
Game Design & Business
Jobs Wanted
Jobs Offered
User Resources
Projects
Showcase
Beyond Games & Money ------
Hilbert's Hotel
Morbius' Virtual Answering Machine
Print Thread
Switch to Threaded Mode
5
Excellent
4
Good
3
Average
2
Bad
1
Terrible
View Profile
Send Private Message
View Homepage
Follow User
Show Forum Posts
View Profile
Send Private Message
View Homepage
Follow User
Show Forum Posts
View Profile
Send Private Message
View Homepage
Follow User
Show Forum Posts
View Profile
Send Private Message
View Homepage
Follow User
Show Forum Posts
View Profile
Send Private Message
Follow User
Show Forum Posts
View Profile
Send Private Message
View Homepage
Follow User
Show Forum Posts
Default Style
gamestudio
UBBT77
UBBT77 - Dark2
Forum Rules
·
Mark All Read
·
Powered by UBB.threads™ PHP Forum Software 7.7.1