Redi Trade Automation

Hello All,

I am working on automating our trading based of an excel spreadsheet. We were provided a spreadsheet we can place orders in and click a button, running a macro to send the orders to the Redi Platform.

What we want to do from here is either update the existing macro or create a new one that automatically sends the trades, once all the required fields are populated. In other words once the Macro recognizes the required trade fields are all populated it will automatically trigger the existing macro sending the trades to the Redi system; without actually clicking to send the trades.

Would someone be able to help us either modify the existing macro or create a new one to trigger the existing Macro once the criteria is met?

Thanks!

Best Answer

  • zoya faberov
    zoya faberov ✭✭✭✭✭
    Answer ✓

    Hello @cisola,

    We strive to help, by guiding developers and developer community toward coding, owning and maintaining robust solutions.

    The examples that we provide to the community are simple, well-documented, and widely applicable.

    We do not code custom use cases to requirements, rather we are willing to help in advisory capacity for you take responsibility for coding and maintaining.

    But whenever possible, we try to find a way to help.

    Your use case is not simple, as you require:

    1. To react to any change in price
    2. Validate all inputs and create a valid REDI order
    3. Submit order to REDI
    4. Update the worksheet with the result of the latest submission request, whether valid or not

    In my understanding, the use case is just complex enough, that there are several ways to approach it. I have coded, as an example, within the code you have included, a version of what I believe your require.

    The cornerstones of my approach are:

    • User Defined Function SENDORDERS that is in Module 6 and reacts to changes and submits orders.
    • public variables changeFlag cellToChange and ValueToSet that signal the change out of UDF and allow Status cells to be updated with the results
    • Sub Workbook_SheetCalculate on sheet itself, that updates the status on the sheet

    It is very likely that this is not all that you require, or not exactly as you envision, or you would prefer a different approach.

    In this case, I hope that the example that you will find attached, will help guide you toward fully implementing to your requirements, next.

    -Zoya

Answers