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)
So I end up with a string with different instructions depending on which indicators I want to use. Below is where I am trying to execute the code by converting the string back to useable boolean logic:
if (tradeStringLong)
GoLong();
if (tradeStringShort)
GoShort();
This does not work and I get the error message. I looked at Eval() but that is not supported. I found Boolean.Parse() but that doesn't seem to work either. Any ideas on how to make this code work?
Can you help answer these questions from other members on NexusFi?
Not exactly what I had in mind, but your comments sparked another angle to get the job done. That is to just cascade the boolean throughout. I was just trying to learn something new and cool.
Yeah actually the code I gave you was quite inefficient, but I am totally out of it lately, very sick. The condition you were evaluating was already a boolean so no need to do the true:false switch lol.
You can maybe rewrite your own Eval(), using the CSharpCodeProvider class, which will compile/execute the code previously generated by the indicator.
But not efficient at all, it's for @gordo who was looking for something "new and cool", but may not to be use in serious code.