Not logged in
Viewing 4 posts - 1 through 4 (of 4 total)

Forums>StrategyQuant>Application Support>Trouble getting strategies to work in MT4

  • #268944 |
    Customer
    8 Posts

    I have been using the Builder to create strategies, then running them through all the robustness/MC tests. Starting with 4000 strategies generated, then ending up with 20 or so that survive.

    I have been trying to convert the SGX files of the surviving strategies to ex4 files and run them in the MT4 Strategy Tester. The ex4 files I have been creating don’t work in MT4 though. No trades are being executed.

    The process I have followed to create the ex4 files is:

    • In the Builder section, Results tab, Source Code tab, I have the strategy selected and populated showing the Pseudo code.
    • I change the Source code type to MQ4.
    • I select the MM type to ‘Stock Size by Price’.
    • I then save the file to Desktop.
    • I open up MT4, select Open Data Folder>MQL4>Experts and paste in the MQ4 file.
    • I open up MetaEditor, open the Experts folder, double click the strategy MQ4 file and the code populates in the work area.
    • I then click the ‘Compile’ button. A second later there is the ex4 file above the MQ4 file in the Experts folder.
    • I open the Strategy Tester, select Expert Advisor, the strategy ex4 file, Symbol, Period, the time period.
    • Click Start, the candles run but no trades are executed.

    Prior to this I did put all the custom SQ Indicators in the Indicator folder in MT4.

    Can anyone tell me where I’m going wrong, what I’m leaving out?

    • This topic was modified 5 months, 1 week ago by Ben.
    #268946
    Customer
    793 Posts

    the problem could be the MM – why stock size by price? because this MM is usable only for trading stocks

    any error in the log if you are trying to make the backtests?

    there is easier way how to save MQL code – select all strategies in the databank and you can click SAVE – SOURCE CODE, where you can choose what code you want to save

    there is no need to save one by one or changing the MM, all MQL code will have the same MM which is used in backtest

    You want to be a profitable algotrader? We started using StrateQuant software in early 2016. For now we have a very big knowhow for building EAs for every possible types of markets. We share this knowhow, apps, tools and also all final strategies with real traders. If you want to join us, fill in the FORM. 1500+ final SQX strategies for members running on demo accounts to verify the edge DEMO ACCS. We provide also strategies for indices - DAX, DOW JONES, NASDAQ, SP, UK, because we have realtick data from our brokers.

    #268948
    Customer
    8 Posts

    I thought it was MM in the beginning, I noticed MM was set to ‘From Strategy’ so I set it to ‘Risk Fixed % balance’. Then I realized that BTCUSD had a super high price per contract so I set it to ‘Crypto size by price’. Each change still didn’t have any effect.  (It was set to Crypto size by price, but that setting shows in the MQ4 code as Stock size by price.)

    Yes there were errors, they are in the image attached.

    Good info re Save – Source Code, however I have no coding skills, at this point. I’m seeing I might need to learn.

     

    Attachments:
    You must be logged in to view attached files.
    #268950
    Customer
    793 Posts

    error 131 – invalid trade volume – your EA is trying to open some lotsize, which cant be traded by your broker

    if i see that you want to trade BTC – my answer is simple, you really need to know what you are doing, what are your broker specifications, you need to have correct data, etc. etc. etc.

    nothing for novices…

    You want to be a profitable algotrader? We started using StrateQuant software in early 2016. For now we have a very big knowhow for building EAs for every possible types of markets. We share this knowhow, apps, tools and also all final strategies with real traders. If you want to join us, fill in the FORM. 1500+ final SQX strategies for members running on demo accounts to verify the edge DEMO ACCS. We provide also strategies for indices - DAX, DOW JONES, NASDAQ, SP, UK, because we have realtick data from our brokers.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.