Cannot backtest in Multicharts: Trades never taken

No trades are ever taken when backtesting in Multicharts.

SetExitOnClose does not use DayExitTime, which means SetExitOnClose actually looks for last bar for current data, instead of last bar upto DayExitTime.

Two example strategies are attached
Attachments
Strategy 31050.el
(8.33 KiB)
Strategy 14253.el
(8.25 KiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

m
#1

murty

16.07.2019 03:37

Task created

m
#2

murty

16.07.2019 03:37
Voted for this task.
MF
#3

Mark Fric

17.07.2019 13:11

Status changed from New to Waiting for information

I don' tsee any error in SetExitOnClose.

Yes, SetExitOnClose doesn't use DayExitTime, but there is a conditinon below it that closes trades after that time.


But your strategies don't generate any prders even without exit at end of day.


Do you see the trades in StrategyQuant when backtesting  with the same data? 

If yes, please attach strategies in .sqx format, not in EasyLanguage.

m
#4

murty

18.07.2019 18:28

Attachment Strategy 14253.sqx added

Attachment Strategy 31050.sqx added

Yes. SQX files attached
m
#5

murty

19.07.2019 00:35
EURUSDe is EURUSD in Eastern time zone (America/New_York)
MF
#6

Mark Fric

19.07.2019 14:51

Status changed from Waiting for information to Refused

I tried to trade your strategy in MultiCharts on EURUSD data and it works without problems. 


But I had to configure it to trade with mmLots(1), it seems MultiCharts has some problem accepting decimal sizes. 


Or it could be that I don't have it configured properly. In any case, Exit at End of Day didn't make any problems.

m
#7

murty

22.07.2019 05:42

I was able to verify that mmLots must be an integer because the code has this statement: NumberOfShares = mmLots;

This is accurate. May be, you should clarify this in the Documentation that mmLots must be an integer, because it is actually number of shares position sizing, where each share is a single unit of currency that is traded.


HOWEVER, StrategyQuant did not subtract spread or slippage for these strategies generated for Multicharts. Although SQ currently does not support 1 minute resolution for building TS/MC strategies, it should deduct spread, slippage, commission (if any).

MF
#8

Mark Fric

22.07.2019 11:23
ok, I made a fix so that position size cannot be decimal number, but integer.


I tested both spread and slippage and it works in StrategyQuant. Can you give more details about this?


The best is if you open a new task for it and post your strategy with some screenshots there.


Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please