Multiple Values in an Input? - futures io
futures io



Multiple Values in an Input?


Discussion in EasyLanguage Programming

Updated
    1. trending_up 358 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Multiple Values in an Input?

(login for full post details)
  #1 (permalink)
CreativelyChris
Los Angeles, CA
 
 
Posts: 2 since Sep 2021
Thanks: 0 given, 0 received

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:

 
Code
Input: 25, 35, 45, 55, 65

Thank you for any help!

Reply With Quote

Can you help answer these questions
from other members on futures io?
Displaying Individual order entry bars for multiple Brac …
NinjaTrader
Can anyone help convert this pine script to EasyLanguage?
EasyLanguage Programming
Order cumulation
TradeStation
NFP
TradeStation
Looking for combined bar type (UniRenko with HeikinAshi) NT8
NinjaTrader
 
 
(login for full post details)
  #2 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,291 since Apr 2013
Thanks: 419 given, 1,525 received

CreativelyChris,

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.

Regards,

ABCTG


CreativelyChris View Post
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:

 
Code
Input: 25, 35, 45, 55, 65

Thank you for any help!


Follow me on Twitter Reply With Quote
 
(login for full post details)
  #3 (permalink)
CreativelyChris
Los Angeles, CA
 
 
Posts: 2 since Sep 2021
Thanks: 0 given, 0 received


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.


Thank you!

Reply With Quote
 
(login for full post details)
  #4 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,291 since Apr 2013
Thanks: 419 given, 1,525 received

CreativelyChris,

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 View Post
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.


Thank you!


Follow me on Twitter Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Multiple Values in an Input?


Last Updated on September 9, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts