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)
Does this simple EL code actually work in TradeStation?
Hello, before I sign up to use the TS platform for backtesting I need to know if my EL code posted below actually works and prints out the number 7 in the TS platform print log. Could someone please test this on their machine. Here is the code that I need tested. Does the EL code below print out the number 7 in the TS Print Log or does it not work for some reason? Really appreciate any help, huge thanks in advance.
welcome to futures.io. Your code will print 0 due to the way StrToNum works.
Take a look at the description for this reserved word taken from the TS help file:
While your expression "AD_Max_Pos_Acc_" + Count_S + "_S" evaluates to the string AD_Max_Pos_Acc_1_S within EasyLanguage, the compiler will treat this as a new string literal and not access the value stored in the variable with the same name.
Hi ABCTG, huge thanks for your help and advice, I really appreciate this. Will my code print the number 7 (instead of 0) if I change the code to the following syntax? If not, can you think of any solution here to get the code to print the number 7 ?
it will also print 0, as you are basically trying the same just storing the string in another variable. You cannot dynamically set variable names and access the values of these variables within EasyLanguage the way you intend to do it.
One idea that comes to mind is using a Dictionary where you can store and lookup values using keys (strings).