Excel VBA vs MQL5 vs ?

Discussion in 'Automated Trading' started by Mr Subliminal, Jul 7, 2021.

  1. In order to test a strategy which had been brewing in my mind, I completed a Udemy course on Pine Script some months ago. I was then able to backtest the strategy in TradingView with 10 lines of Pine Script code.

    Pleased with what I saw and confident that there was no curve fitting, I thought I would try automating the strategy, the main reason for this being that my gung-ho SOMP™ style of discretionary trading is the direct antithesis of what would be required here. Simply put, there's no way in hell I could successfully trade this on my own.

    My futures platform of choice has been Rithmic's R | Trader Pro. Unfortunately TradingView does not interface with R | Trader Pro or its Excel interface. Being somewhat familiar with Excel VBA, and having used it to submit orders to R | Trader in the past, I embarked on my little automation project. However, I'm at the point now where I will need to hire a VBA pro to finish the job.

    Now while all this was occurring, I had heard about MetaTrader 5 and its vaunted EA's, so simultaneously and in parallel I completed 2 Udemy courses on MQL5 programming, and hired a developer from the MQL5 community to code the aforementioned bot for MT5. Of course, what with the language and time differences, the code is about 80% what it should be, but I got more than what I paid for.

    I realize this is simple, retail automation. I know that completing a Udemy course does not a programmer make, but I'm not looking to expend time and resources for anything sophisticated. While this is far from HFT, I estimate about 30 R/T's in a session, and will be looking to trade this with a VPS for other reasons. Also, I know what some of you think about MQL5 and Excel VBA. However, I value your opinions and would like to know which of the following 3 options (pros & cons) would be the best choice :
    1. R | Trader Pro with AMP Futures : Hire a VBA pro to complete project. Estimated time required : ~3 hours (including testing).
    2. MT5 with AMP Futures : Hire MQL5 pro to complete present EA. Estimated time required : ~3 hours (including testing).
    3. A solution I may have overlooked. I can reluctantly invest another (very) few hours in learning a new platform/language but the effort would have to be worth it.
    I welcome your comments. And this being ET, let me pre-empt any suggestions that my real motive is to sell my strategy. Look at my posting history. The only thing I touted on this website was a now aging dominatrix. Also, I know that I cannot compete with the big boys, so no need to repeat it.
     
  2. RedDuke

    RedDuke

    wow, 10 lines of code. Any algo i ever wrote has 1000s of lines. Trade
    Management alone is a huge component. How wound you handle situations if stop does not get set or set at incorrect Level or with incorrect quantity. Just few examples. It takes a big effort to built robust algo engine, the main ingredient of course being the core
    Logic of entries. Another one of my favorite, you lost connection to broker and the list is very long. Good luck doing it in 3 hours and with 10 lines of backtest.
     
  3. userque

    userque

    Good luck!

    I'm just curious as to what you specifically couldn't do yourself in VBA?
     
  4. Thanks for your reply. As I mentioned, the 10 lines of Pine Script were just to backtest the strategy which is very straightforward. No trade management. Pine Script has some very powerful trading-specific functions. Here's 4 lines randomly picked out of one of their strategies :

    k = sma(stoch(close, high, low, 14), 3)
    d = sma(k, 3)
    co = crossover(k,d)
    cu = crossunder(k,d)

    How many lines would this normally take?

    However you are correct in that I have yet to cover all the contingencies that could arise when trading.
     
    Last edited: Jul 7, 2021
  5. RedDuke

    RedDuke

    glad you know this about contingencies. Ninja c# would have same line simple culc within if statement.
     
  6. The handling of streaming data from R | Trader Pro and some basic trade management.
     
  7. I understand you are satisfied with the NinjaTrader platform. Have you heard anything good or bad about MT5 and MQL5 as far as automated futures trading goes?
     
  8. In terms of automated trading, the most common setups we see on our colocated Chicago servers are NinjaTrader + IBKR, or MT4/5. Especially for US based traders, MT + OANDA is very popular with our VPS customers.
     
    Mr Subliminal likes this.
  9. c# really does makes NinjaTrader very flexible for programming. There are even alot of undocumented functions that support can help with so that you're not reinventing the wheel when it comes to risk/trade management.
     
    Mr Subliminal and RedDuke like this.