Guys,
It’s me again. Firstly, I would like to reiterate my thanks for the code you’ve helped me with so far. I’ve made significant money in the past couple of months and couldn’t have done it without you! 🙂
But now I’ve noticed some discrepancies. I have given my friend the same bots and we have replicated the charts, and yet there are quite a few trades where he has exited at significantly different times having entered at the same time.
Here is an example:
-Both of us entered SHORT at 12,532
-I exited at 12,332 on July 14, but he exited at 12,424 on July 15
-My exit is shown on the chart in the first attachment
-His is shown in the 2nd
-The overview of the length of the trade is the third
There are two things that are bothering me here.
1. That my trade closed during the first bar of Sunday at 18:02, and yet you can clearly see the market was higher at 16:00 on Friday…. so why didn’t the stop kick in at that time on Friday?
2. The vast disparity between me and my friend who was using the same bot. His stop only kicked in the following day and there’s almost a 100-point difference. It isn’t like the market kissed a high/low briefly and the bot failed to fire in a split second…. there are a vast amount of bars that closed higher than the one I exited at earlier.
Could anyone kindly explain what might be going on here?
Thanks in advance….
PS: here is the code…
Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
StartTime = 080000
LimitEntryTime = 110000
daysForbiddenEntry= OpenDayOfWeek=1 OR OpenDayOfWeek=2 OR OpenDayOfWeek=4 OR OpenDayOfWeek=5 OR OpenDayOfWeek=6 OR OpenDayOfWeek=0
sl= 133
slmove = 5
indicator1 = SAR[0.02,0.02,0.2]
c1 = (open > indicator1)
indicator2 = Average[20](close)+std[20](close)
c2 = (open > indicator2)
indicator4 = BollingerDown[20](close)
c3 = (indicator1 > indicator4)
indicator5 = ExponentialAverage[13](close)
indicator6 = ExponentialAverage[13](close)
c5 = (indicator5 >= indicator6[1])
indicator7 = ExponentialAverage[8](close)
indicator8 = ExponentialAverage[8](close)
c7 = (indicator7 >= indicator8[1])
IF not onmarket and c2 and c1 and c3 and c5 and c7 and time >=StartTime and time <=LimitEntrytime and not daysForbiddenEntry THEN
BUY 1 PERPOINT AT MARKET
slprice = close - sl
sell at slprice stop
ENDIF
c11 = (open < indicator1)
indicator12 = Average[20](close)-std[20](close)
c12 = (open < indicator12)
indicator14 = BollingerUp[20](close)
c13 = (indicator1 < indicator14)
c15 = (indicator5 <= indicator6[1])
c17 = (indicator7 <= indicator8[1])
IF not onmarket and c12 and c11 and c13 and c15 and c17 and time >=StartTime and time <=LimitEntrytime and not daysForbiddenEntry THEN
SELLSHORT 1 PERPOINT AT MARKET
slprice = close + sl
exitshort at slprice stop
ENDIF
if longonmarket and high - sl > slprice + slmove then
slprice = high - sl
endif
if shortonmarket and low + sl < slprice - slmove then
slprice = low + sl
endif
if onmarket then
sell at slprice stop
exitshort at slprice stop
endif
Have you checked your orders list to see if either of you had any rejected orders around that time? Maybe your strategies were working the same but communication issues between IG and PRT caused pending orders to not be placed on the market by one strategy.
Yes, that has been checked. We both had a rejected order last month but not with this particular Wednesday bot.