Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I have a strategy I want to use where I buy only on certain days of the year - is there a way to put multiple "values" into the an Input of a strategy?
I haven't figured out how to enter in multiple values? (Is that even possible?) Or do I have to modify the code of the strategy in some way?
For example what I want to do is:
Thank you for any help!
Can you help answer these questions from other members on NexusFi?
welcome to futures.io. Your best bet will likely be using a string that you use to extract the inputs from within your code. You could provide the dates as one comma separated string for example, but you would have to split this string within your code and extract the dates. Another approach could be reading the inputs in from a file and processing them within your code.
I've found in the documentation that in "elsystem.collections" there is a Split() function.
This seems to require me to put the data into a vector.
Is this the best method to go about this?
I'd have to put the string into a vector -> split it -> convert string to a number -> compare my source value (date) to see if it matches any of the values in that vector?
I'm very new to EL, so if there is a better method, or easy way to compare the source value to a list of values any advice/help would be greatly appreciated.
there are multiple reserved words to manipulate strings that would not require using a vector, but the Split method can be very convenient, though.
Split returns "a vector of elements that were delimited by the Separator string". You do not have to put your string in a vector first.
In the end you would need to check if the current bar's date is included in the vector to see if trading is allowed on that day. For that you could convert the
date to a string and check if this string is included in the vector.
Regards,
ABCTG
CreativelyChris
Thanks for the help.
I've found in the documentation that in "elsystem.collections" there is a Split() function.
This seems to require me to put the data into a vector.
Is this the best method to go about this?
I'd have to put the string into a vector -> split it -> convert string to a number -> compare my source value (date) to see if it matches any of the values in that vector?
I'm very new to EL, so if there is a better method, or easy way to compare the source value to a list of values any advice/help would be greatly appreciated.