StrToBool question - futures io
futures io futures trading



StrToBool question


Discussion in EasyLanguage Programming

Updated by benracz
    1. trending_up 804 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 5 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,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)

 
Thread Tools Search this Thread
 

StrToBool question

  #1 (permalink)
Miami, USA
 
 
Posts: 11 since May 2017
Thanks: 1 given, 8 received

StrToBool question

Hi Everyone,

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

Reply With Quote

Can you help answer these questions
from other members on futures io?
Convert NinjaTrader NT7 indicator to Tradestation EasyLanguage and RADARSCREEN
Platforms and Indicators
Issue meeting order entry conditions
Elite Automated NinjaTrader Trading
Last 5 minutes Label
ThinkOrSwim
Moving average with Lag reduction
NinjaTrader
Linux?
ThinkOrSwim
 
 
  #3 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,178 since Apr 2013
Thanks: 384 given, 1,411 received


Ben,

you could write your own StrToBool function, pass a string to it, evaluate it and return a Boolean.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #4 (permalink)
Miami, USA
 
 
Posts: 11 since May 2017
Thanks: 1 given, 8 received

Hi ABC,

Thank you for the response.

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

-Ben

Reply With Quote
 
  #5 (permalink)
Hamburg Germany
 
Experience: Advanced
Platform: Multicharts, Tradestation
Broker: DTN IQ
Trading: ES
 
Posts: 2,178 since Apr 2013
Thanks: 384 given, 1,411 received

Ben,

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.

Regards,

ABCTG


benracz View Post
Hi ABC,

Thank you for the response.

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

-Ben


Follow me on Twitter Visit my Facebook Reply With Quote
 
  #6 (permalink)
Miami, USA
 
 
Posts: 11 since May 2017
Thanks: 1 given, 8 received

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.

Reply With Quote



futures io Trading Community Platforms and Indicators EasyLanguage Programming > StrToBool question




Upcoming Webinars and Events
 

Free BloodHound Licenses to everyone!

June
 

Every journal equals ten meals for the hungry

June
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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