PuneetTewani Posted October 23, 2017 Share Posted October 23, 2017 I am trying to automate my trading. I have used NEST RTD so that I can receive live data in excel. I want to compute average of 14 cells dynamically and the if average is greater than a particular number(for ex: 90), We buy a script and parameters for buy (i.e. Quantity, Limit Price) could be defined from excel itself. Link to comment Share on other sites More sharing options...
iamtheky Posted October 23, 2017 Share Posted October 23, 2017 (edited) show the excel document and/or the code you have currently. You will find lots of resistance if you expect us to code something while you have thought exercises. Edited October 23, 2017 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
Earthshine Posted October 23, 2017 Share Posted October 23, 2017 why can't you use VBA inside of your Excel sheet and automate it that way? My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
PuneetTewani Posted October 29, 2017 Author Share Posted October 29, 2017 I went through some articles on internet but isn't aware how to inject dll into system from VBA. Attaching the excel file that is being used in current context. The cell B2 is tracked and its value is recorded on cell V2 and so on at time interval of 3 minutes and I am trying to calculate average of 14 relevant cells(which keeps on changing as new rows are recorded) in cell W2 and if W2 > V2 inject a buy dll into system. Please also help in how to pass parameters to dll from excel. Thanks in advance. Default MW1.xlsm Link to comment Share on other sites More sharing options...
Earthshine Posted October 31, 2017 Share Posted October 31, 2017 (edited) you really need to search google. https://msdn.microsoft.com/en-us/library/office/bb687915.aspx#sectionSection0 When you have Excel open, press ALT-F11 keys and the VBA editor shows up. Next, use Insert from the menu and add a new module You can now create custom VBA functions now and call your DLL all you want. you can attach the module to cells and whatnot, just like a formula Edited October 31, 2017 by Earthshine PuneetTewani 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now