Reply

Trouble getting strategies to work in MT4

3 replies

Ben

Subscriber, bbp_participant, customer, community, sq-ultimate, 9 replies.

Visit profile

3 years ago #268944

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?

0

hankeys

Customer, bbp_participant, community, sq-ultimate, 487 replies.

Visit profile

3 years ago #268946

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 2014. 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.

0

Ben

Subscriber, bbp_participant, customer, community, sq-ultimate, 9 replies.

Visit profile

3 years ago #268948

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.

0

hankeys

Customer, bbp_participant, community, sq-ultimate, 487 replies.

Visit profile

3 years ago #268950

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 2014. 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.

0

Viewing 3 replies - 1 through 3 (of 3 total)