StrToBool question - futures io
futures io futures trading



StrToBool question


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,061 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




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

 
Search this Thread
 

StrToBool question

(login for full post details)
  #1 (permalink)
Miami, USA
 
 
Posts: 11 since May 2017
Thanks: 1 given, 8 received

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?
Which kind of Blockvolume is visible? - order processing
Emini and Emicro Index
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
What blockvolume is visible? - order processing
NinjaTrader
Short Interest Ratio indicator?
ThinkOrSwim
Automatic pattern research with NT
Elite Algorithmic NinjaTrader Trading
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Selling Options on Futures?
109 thanks
Battlestations: Show us your trading desks!
108 thanks
Rank your Futures vs Stocks trading priority
55 thanks
Want your NinjaTrader indicator created, free?
27 thanks
Whats this confusion with margins?
21 thanks
 
(login for full post details)
  #3 (permalink)
 
 
Posts: 2,230 since Apr 2013
Thanks: 409 given, 1,471 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 Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #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
 
(login for full post details)
  #5 (permalink)
 
 
Posts: 2,230 since Apr 2013
Thanks: 409 given, 1,471 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 Reply With Quote
 
(login for full post details)
  #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


Last Updated on July 5, 2019


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 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