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'm in the process of developing a web-based monitoring system for my trading and MultiCharts/EL strategies, and I find myself thinking: under certain circumstances it could it be cool to be able to specify some rules from a web interface, and execute them with MultiCharts/in EL, using only a web GUI.
The problem I'm stuck with - and this is probably impossible to solve, but I thought I'd post here and ask anyway -, is how do I turn a "string" input (saved to a file, or taken from database using sharedvar server, or any other solution) into a proper boolean that would then in turn convert the condition from a string to a 1 to a 0 depending on whether it's true or not. So I could just go on the web, take a "Rule" text window and put "rsi(close,50) > 20" or something, hit save, that would go to a file or database, find its way into a variable in MultiCharts and the strategy would get backtested/executed on MultiCharts without having to recompile code (to which I have found no good "remote" solution yet).
I find myself craving for either a command-line compiler or an StrToBool function or something and wondering if anyone has any other solution to this.
The closest I've gotten with my brainstorm was to run another app to backtest in, and save the backtest results (1 or 0 for every bar) into a file and then using that variable - since it's a number already. But the workaround is messy.
Does anyone happen to have any solution to this that I'm not thinking of?
-Ben
Can you help answer these questions from other members on NexusFi?
Maybe it's just me being slow, but how would you "evaluate" whether the "string" containing a trading rule (for example "close > rsi(close, 21)") is "true" or "false"? It's just a string, as far as the compiler is concerned!
This is where I'm stuck at. It might be just too simple for me to see it, been working long hours lately haha
this will only work if you know what you are looking for i.e. the function would have to be aware of the possible strings in advance and evaluate what ever you pass based on that.
You might be able to break down the string in multiple parts and have the function combine it, though.
Yeah - that was kind of the point. I could as well generate a database of signals with 1's and 0's in advance and bool from there. But it kind of negates the whole point of doing it. Which is why I was looking for an actual, proper solution/ideas. Thanks for the brainstorm though.