botoballs 2 Posted February 21, 2014 Report Share Posted February 21, 2014 I'm not quite sure but I am working on a forex bot that can calculate numbers and do a run base on the calculation results.Lets say USD has a 1.3665 and the results will come later about an hour later with the results for example 1.3777. This means the market went up an hour. Can ubot calculate these two and have it do something I want the bot to do afterwards?If so which, area in ubot can I learn this from at the left side? Quote Link to post Share on other sites
bestmacros 60 Posted February 21, 2014 Report Share Posted February 21, 2014 check once per hour -if rate before < current rate = the market went up Quote Link to post Share on other sites
botoballs 2 Posted February 21, 2014 Author Report Share Posted February 21, 2014 check once per hour -if rate before < current rate = the market went upSorry can you rephrase? I'm still new to ubot. Quote Link to post Share on other sites
darryl561 177 Posted February 21, 2014 Report Share Posted February 21, 2014 Try the example below. I used whole numbers for the example but it will work the same with 4 decimal points. So you would do a scrape for "first price", then do another scrape an hour later for "second price" (I just used a set/random number for the example) then use an if command to see if the price went up or down. ui button("run") { set(#first price, $eval($rand(1, 9)), "Global") set(#second price, $eval($rand(1, 9)), "Global") if($comparison(#first price, "<", #second price)) { then { alert("Price went up") } else { alert("Price went down") } } } Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.