Excluding Overlapping Trades – Help Please

5 replies


Subscriber, bbp_participant, community, 3 replies.

Visit profile

8 years ago #114585

Hi Team,


I would like to understand what exactly “Exclude Overlapping Trades” does in What If


I have a basket of EA’s with a number of currency pairs


When a signal is triggered in any pair it takes many simultaneous trades


If I tick the above if another pair is triggered to trade at the “same time” whilst the first lot of positions are still open will it ignore these?


-Does it exclude overlapping trades at the TIME the trades are initiated/opened OR does it simply prevent more than one curreny pair trading at ANY point in time?







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

Visit profile

8 years ago #134659

Hello tassa1975,
“Exclude Overlapping Trades” 
it removes trades which opened before previous trade closed.
Please see the snippet in QuantEditor.
It is very simple and straightforward.
Best regards,



Subscriber, bbp_participant, 1 replies.

Visit profile

6 months ago #284098


I am also struggling to understand this whatif function of “excluding Overlapping Trades”. I’ve attached an image containing a list of trades (left side) showing the original portfolio, and a list of trades (right side) showing the portfolio after applying the overlapping trades filter. Since the first trade USDCAD was closed on 01.10.2012 at 11:00:00, shouldn’t the EURCAD trade highlighted on the list to the left be opened next since it was opened on 01.10.2012 at 16:00:00 or even the next trade EURGBP 02.10.2012 at 06:00:00 instead of the AUDCAD 02.10.2012 at 19:00:00? Or am I missing something? It also seems like every trade with a duration greater than 8 days was skipped even if they were next to be opened.

I really admire this software and am starting to develop a level of dependence on it, but this issue lessens my trust. I hope there’s something I’m just overlooking.

Thank you for your time!


You must be logged in to view attached files.



Subscriber, bbp_participant, 3 replies.

Visit profile

4 months ago #285019

<span class="Y2IQFc" lang="en">Hello, I am also in the same situation. Since the simulation results were too good it seemed very strange to me, and when I compared the list of trades I found inconsistencies. The simulation skips positions that should have been opened, and what is more striking, the positions that it does not take into account are the ones that cause losses. This results in a very harmonious curve, with a very high profit and a minimum drawdown. Something that is far from reality. I would greatly appreciate an explanation if I am wrong. Best regards</span>



Subscriber, bbp_participant, 3 replies.

Visit profile

4 months ago #285042

I did the simulation in Excel by adding code to a new module in the csv file downloaded from QA, corresponding to the original portfolio.

The code was the following:



Dim i As Long

Dim lastRow As Long

Dim iterationCounter As Long


‘Set the iteration limit

Const iterationLimit As Long = 20000


‘ Find the last row with data in column A

lastRow = Cells(Rows.Count, 1).End(xlUp).Row


‘Start from the third row and loop until the last row

i = 3

iterationCounter = 0


Do While i <= lastRow

‘ Check if A(i) is less than B(i-1)

If Cells(i, 1).Value < Cells(i – 1, 2).Value Then

‘Delete row i


‘ Update the last row after deleting a row

lastRow = lastRow – 1

‘Do not increment i since a row has been deleted


‘Increment the counter to analyze the next row

i = i + 1

End If


‘Increment the iteration counter

iterationCounter = iterationCounter + 1


‘ Add a condition to exit after 20000 iterations

If iterationCounter >= iterationLimit Then

MsgBox “The limit of 20000 iterations has been reached. The process has been stopped.”

Exit Sub

End If


End Sub


I attach screenshots of the original portfolio, the one created by QA and the one created by Excel. I hope this helps to understand the differences.

Best regards

You must be logged in to view attached files.



Subscriber, bbp_participant, 3 replies.

Visit profile

4 months ago #285048

Well, I already found where the difference is in the interpretation of the data, and it depends on how the list of trades is ordered. I was able to reproduce this in Excel.

For the “Exclude overlapping trades” function to make the simulation according to reality, the list of trades should be ordered with the number “1” in the filter. If the list does not have the number “1”, the Excel simulation obtains a result exactly the same as QA.

The downside is that Quant Analiyzer, by default, always takes the sorted list without the number “1”, so it always results in the same smoothed curve.

I did not identify what the trade ordering criteria is when the filter does not have the number “1”.

I know you have a lot of work, but I hope this feature can be corrected in subsequent updates. QA is really an excellent platform.

Best regards

You must be logged in to view attached files.


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