Hi Everyone,
I'm in the process of developing a web-based monitoring system for my trading and MC 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 MC, 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 MC and the strategy would get backtested/executed on MC 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
StrToBool question
- ABC
- Posts: 723
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: StrToBool question
Ben,
you could write your own StrToBool function, pass a string to it, evaluate it and return a Boolean.
Regards,
ABC
you could write your own StrToBool function, pass a string to it, evaluate it and return a Boolean.
Regards,
ABC