Register
Log In
Forums
Starting with Zorro
String fast question
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
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
♪♫♪ [For hire] VOLKOVSTUDIO - Music, SFX, Voice over, implementa
by Volkovstudio. 03/25/24 12:30
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
Who's Online Now
1 registered members (
opm
), 778 guests, and 4 spiders.
Key:
Admin
,
Global Mod
,
Mod
Newest Members
sakolin
,
rajesh7827
,
juergen_wue
,
NITRO_FOREVER
,
jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
String fast question
#477671
07/20/19
21:29
07/20/19
21:29
Joined:
Jul 2019
Posts: 26
M
maxwellreturn
OP
Newbie
maxwellreturn
OP
Newbie
M
Joined:
Jul 2019
Posts: 26
Hi all, sorry for my dumb question
how can i get a string from a variable for use it in the text editor. For example:
Code
string x = "SMA"; vars MA = series(x(priceClose(), 100));
PS. without using "#define x SMA", only with string var.
Thanks
Last edited by maxwellreturn;
07/20/19
21:36
.
Re: String fast question
[
Re: maxwellreturn
]
#477672
07/20/19
22:22
07/20/19
22:22
Joined:
Feb 2017
Posts: 1,718
Chicago
AndrewAMD
Serious User
AndrewAMD
Serious User
Joined:
Feb 2017
Posts: 1,718
Chicago
Your choices are:
* Use a macro
* Use a function pointer
* Have the string as an argument for a wrapper function.
Take your pick.
www.vitaltrades.com
-
andrew@vitaltrades.com
Re: String fast question
[
Re: maxwellreturn
]
#477676
07/21/19
06:23
07/21/19
06:23
Joined:
Jul 2019
Posts: 26
M
maxwellreturn
OP
Newbie
maxwellreturn
OP
Newbie
M
Joined:
Jul 2019
Posts: 26
hi andrew thanks for your answer, can you give me examples for every choice?
Re: String fast question
[
Re: maxwellreturn
]
#477681
07/21/19
15:49
07/21/19
15:49
Joined:
Feb 2017
Posts: 1,718
Chicago
AndrewAMD
Serious User
AndrewAMD
Serious User
Joined:
Feb 2017
Posts: 1,718
Chicago
There is an excellent example of how to do this. Read this blog article by jcl:
https:/
/
financial-hacker.com/
trend-and-exploiting-it/
The function filter() is redefined many times in a large scale test, using batch scripting. Definitely give it a look.
www.vitaltrades.com
-
andrew@vitaltrades.com
Re: String fast question
[
Re: AndrewAMD
]
#477684
07/21/19
16:56
07/21/19
16:56
Joined:
Jul 2019
Posts: 26
M
maxwellreturn
OP
Newbie
maxwellreturn
OP
Newbie
M
Joined:
Jul 2019
Posts: 26
thank you andrew this is an elegant solution. i think with this you refere to your third choice, the "wrapper function". Can i ask you for the second choice how can i pratically do it?
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
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
View Profile
Send Private Message
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