Custom VBA by Exceltrader

****Please note: Custom Programming is not currently available due to existing obligations.****


With a little programming almost any trading related need can be met in excel.  Examples of  my very recent completed Projects include:

  • Automated Forex System (single signal with 5 time frames and Backtest)
  • Forex Arbitrage System (rapid execution required)
  • Options Automated Trading System : Monitor and analysis. (Black Scholes calcs, IV, Projections, automated Log, other custom calcs)
  • Stock/ETF: End of Day Scanner and intraday Signal alerter.
  • Automated Futures Trading system and back testing with analysis of tick data – daily data and VIX correlation study.
  • Automated Stock Trading: Backtesting. Unlimited Symbols:  Results Analysis (Sharpe ratio etc.)
  • Analysis of Live data in terms of Rise/Run. Summary of all Slopes.
  • Excel Integration (quotes and orders) with the ChoiceFX api.  (Part of a larger Automated Forex System.)
  • Automated Stock Trading system with over 50 system choices built from drop down menu.
  • Simulator and ATS integrated with another VBA author’s code
  • DOM/ Depth of Market Order entry system and trade manager.
  • Many other Trading related Excel/VBA projects.

Other Non VBA Projects:

  • A Real Estate investing website which includes interactive display of Available Properties including user chosen loan terms such as rate, term, management fee, taxes etc. User can sort by cash flow, Return on Investment etc. (PHP, Mysql, Javascript) *Note that the links were posted with permission from the client. No private client information is ever posted without your permission.

My hourly rate for trading related VBA custom programming is 45 dollars.

To get started, send an explanation of what you would like programmed to  the email address located in the image at the top right of this page. I will respond back with preliminary estimated hours. If this estimate is acceptable to you, then the next step will be to send all detailed information that you feel would be necessary in order successfully complete the project. I will then respond with any questions/clarification needed.

I will then inform you of final estimated hours and begin your project. (if it takes me longer than final estimated hours there is no additional charge as long as no additional items have been requested).


“The version 1.13 works very well for US stocks. Thank you very much! You are the excellent system developer i ever meet.”

Dr. Thomas KL Tong, Project Manager, CityU Professional Services Limited, Hong Kong *quote and name used with permission


  1. Maurice says:

    First of all, thanks very much for creating the stockbacktest.xls. I am using it now to test strategies and except for the 'trailing stop' box, for which i have to check my indicators it works very good. Moreover, i have tested 1 minute and 5 minute stockdata and now i want to implement live trading based on these time-intervals.
    I have a request for a customised xls, which maybe you have already created as part of the automated trading platform.
    Since i'm just getting started on a more structured approach to trading i am not able to open an intraday account with interactive brokers.

    I have subscribed to a low cost datavendor which enables me to have live tickdata by means of an excel plugin.
    My request would be to have an xls which would:
    - make a vertical row of the tickdata and most importantly
    - create open high low close by any given intraday time-interval instantly and automatically based on the realtime tick data.

    Please give me an estimate of the cost and if it is possible..


    Maurice Niessen

  2. As I understand it so far, you need:

    A workbook, let's call it "recorder" that records every price change, the time of price change, and the volume when price changes.There would be a button to save the tick data to a separate "tick data" file. (this could also be set to save at a certain time of day such as market close).

    Recorder would also be capable of converting this tick data file to (any time frame) OHLC and save it to a separate file.

    For how many symbols at a time are you wanting to record tick data?

    Is there any thing else that this workbook needs to do?

    So far this would take around but not more than an hour.

  3. Maurice says:

    No, this is not exactly what i mean.

    The converting of tick data into OHLC has to happen real time, since i want to execute my trading sytem real time.
    (not after pushing a button but as tick data flows in)

  4. Exceltrader says:

    1. Do you want this OHLC data placed on a blank worksheet or your modified stockbacktest.xls (or some other workbook)?
    2. Are you sure that you need the tick data recorded? If so, it's no problem but it's not needed to create the OHLC data from live data.
    3. For how many symbols at a time are you wanting to create OHLC data from live data?
    4. Is there any thing else that this workbook needs to do?

  5. Maurice says:

    1. OHLC data could be put in a different worksheet. Can you put in an automatic limit of (any number i want) colums, which automatically refreshes.
    For instance 20 rows of OHLC minute data,row 20 would refresh,
    so i can put my buy/sell signal on E20.

    2. Tick data does not have to be recorded.

    3. max 5. but most time only need 1 or 2.

    4. It would be best if - like stockbacktest - the same open buy, open sell, closed sell, closed buy would be inserted and a record of the trades.
    Please inform me of additional cost.


  6. Exceltrader says:

    1. Are you going to be manually entering orders when a signal is generated? if so do you need any kind of alert that a signal has been hit?

    2. by columns, I assume you mean rows in the following sentence, is that correct? "Can you put in an automatic limit of (any number i want) colums, which automatically refreshes."

    I can do this in one hour so total would be $35 via paypal to the email address in the top right of this page.

  7. Exceltrader says:

    Thanks, I will email you the download link to your hotmail account no later than Sunday night.

  8. Maurice says:


  9. Maurice says:

    1. Yes, an acoustic alert would be great.
    2. Sorry, yes i meant rows

    Just donated $35.01 via paypal to strategictrade email account.

    Thanks! Maurice

  10. Exceltrader says:

    I have completed this project and sent it to you via email. Let me know if you have any problems questions.

  11. Maurice says:

    Testing manually now - when i set number of minutes to 1 minute i get 2 or 3 bars for every minute instead of one.

  12. Exceltrader says:


    Each time the "start button" is pressed a new Bar update is scheduled based on the number of minutes set in B2.

    I have now updated this file (and emailed it to you) so that Each time the "Start" button is pressed any previously scheduled bar updates are canceled.
    In addition, the button titled "Stop Updating OHLC" was not working. I have updated this also so that now you can stop bars from updating (for example when the trading day is over but you want to keep the workbook open etc).

  13. Maurice says:

    Works like a charm - the acoustic order confirmation also works good!
    Thanks a lot!

  14. Maurice says:

    I am contemplating using VWAP as a additional trading tool (not sure yet).
    Just to get an idea, would it be possible to incorparate this into the existing workbook. If so, could you give me an estimate on the cost?
    Thanks! Maurice

  15. Exceltrader says:

    Do you think this needs to be programmed with VBA or could you just use the formula area? (you talking about Volume-Weighted Average Price?)

  16. Maurice says:

    Good point, i'm not sure yet. I thought about vwap calculation within every minute, that would require vba, but maybe vwap from minute to minute would be sufficient. Then i could manage without vba. I wil come back after i tested this. Have you had any experience with vwap? I read it's an excellent added indicator.
    Furthermore, you wouldn't have any experience with programming expert advisors for forex or know someone who does?

  17. Exceltrader says:

    Formulas could be used for continuous updating of the indicator. VBA could be used to only update is once per minute.
    (I have not used vwap or metatrader. )

  18. Maurice says:


    Attempting to go live with the US opening today, but there is a problem with my workbook.
    Worked fine yesterday, did not make any chances since.
    Before, i needed to change my windows settings to an different number format, since my feed uses " , "for decimals, not ". ".
    Hope you can check it out, so i can use my workbook to trade today.
    I send it to you together with the error code

  19. Exceltrader says:


    In cell O140 there is a "BUY" (to open) and also a "SELL" (to close) in P140. This will result in a continuous loop that will result in an error. There should never be a sell to close at the same time there is a buy to open so the formulas should be changed/fixed so that this never happens. (This crossed logic is one of the biggest dangers of automated trading systems, imagine some programming error where the system just bought and sold non stop all day.)

    To fix your formulas without all the error messages, open Excel, click TOOLS> MACROS> SECURITY> and set it on the highest setting (so that you can open the workbook without code running). Then open up the worksheet and fix the formulas so that there is no simultaneous buy to open and sell to close. (Once that is done, lower the security settings again, save close and reopen the workbook so that code can run.)

  20. Maurice says:

    Thanks very much!

  21. Maurice says:

    in order to fix the problem with the BUY-SELL loop and dynamic entry and exit price a box (as in stockbacktest) showing last order entry type is necessary for my system. Would it be possible to add this box on the first worksheet (were the OHLC of the first stock is projected).

    Furthermore, would it be possible to set the automated ohlc timer in a way that it automatically follows the internal clock on my windows (so when i press start it starts a new minute at zero seconds exactly?

    kind regards,

  22. Exceltrader says:

    I have emailed you the updated version. Here is a list of changes.

    Added last order type in column E of "Main" sheet
    Added VBA based logic that an entry should not occur if there is a simultanous exit.
    Pressing the "Start" button now waits until the current minute is up before starting new bars (nothing will appear to happen until the current minute is up). All bars start exactly on the minute.

  23. Maurice says:

    Thanks man ! Just made a small donation ($15,-) as a token of my appreciation!

  24. Maurice says:

    Excel-trader, can you recommend a low cost provider of a dde link with sp500 futures data, (not combined with a trading account)?

  25. Exceltrader says:

    Much appreciated!

  26. Exceltrader says:


    I have not tried this, but esignal has an excel plug in for live data called Qlink.

  27. Maurice says:

    Thanks! i will check it out.

  28. Exceltrader says:

    Also, this free plug in that runs yahoo live data in excel on (Yahoo symbol for Emini is ESM09.CME). I have not tried this either.

  29. Maurice says:

    Thanks, the problem with the greenturtle plug in is that, as far as i see on the site, it is not an actual streaming realtime plug in. You set an update interval. I have tried simular plug-inns. You miss quotes this way and a website queiry is run at the specified time-interval, which can slow other processes if the interval-time is short.
    Thanks a lot though for the tip!