The reason of different result between SQ and MC

1, There are some obvious bugs in TS's code. I've added comments in the following example



ex. 


//------------------------ // Rule: Long entry - Orders Exits //------------------------ if(MarketPosition > 0) then begin // StopLoss SL = Round2Fraction(CurrentAsk - (3.0 * SQ_ATR(20)[1])); // Why using CurrentAsk here? Not Close, or High? SL = SQ_CorrectMinMaxSLPT(SL, MinimumSLPT, MaximumSLPT, true); Sell("LongSL") next bar at SL stop;           // ProfitTarget PT = Round2Fraction(CurrentAsk - (5.4 * SQ_ATR(20)[1])); // As long position, It's "price + 5.4*ATR" here, I think. PT = SQ_CorrectMinMaxSLPT(PT, MinimumSLPT, MaximumSLPT, false); Sell("LongPT") next bar at PT limit;             // Trailing Stop   PriceLevel = 2.6 * SQ_ATR(140)[1]; // Like PT setting, is it entryprice + 2.6*atr here? some bug in move 2 Be   If PriceLevel > 0 then begin     If CurrentBid - EntryPrice >= 0 and (SL = 0 or SL < PriceLevel) then begin         SL = PriceLevel;             Sell("LongTrailingStop") next bar at SL stop;         end;     end;                                           end;





2. And some trades in list does not match the trade on charts. There is a "Close type" field in List of trades. But I only find there are Manual, SL, PT. I have located some trades ion Chart, it's doesn't match.
It's better to identify trades type clearly for stop loss, profit target, profit trailing, move2be...  




3,I test some other trading system builder. They use different codes for TS and MC. So can we use real multicharts back test engine? I strongly request and advise you to do so.

Attachments
Strategy 1877.sqx
(277.43 KiB)
trading on chart.png
(85.08 KiB)
Strategy 01294167.sqx
(598.88 KiB)
tradinglist.png
(34.23 KiB)
Strategy 0407.sqx
(229.01 KiB)
  • Votes +5
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

e
#1

eastpeace

30.12.2018 13:05

Task created

RL
#2

rickliao

30.12.2018 18:38
Voted for this task.
RL
#3

rickliao

30.12.2018 18:54
Hi eastpeace, you'd better also attach builder config(.cfx file), that would be helpful to look into for SQ team.
g
#4

geektrader

30.12.2018 19:19
Voted for this task.
IH
#5

clonex / Ivan Hudec

01.01.2019 19:52
Voted for this task.
o
#6

Enric

02.01.2019 16:31
Voted for this task.
TB
#7

Tomas Brynda

03.01.2019 09:32

Status changed from New to In progress

cj
#8

cjl

14.01.2019 14:42
Voted for this task.
MF
#9

Mark Fric

22.01.2019 13:29

Status changed from In progress to Fixed

exit methods like SL, PT, Move Sl 2 BE should be fixed now

Votes: +5

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please