"Ghost operations" with low TF robots
Forums › ProRealTime English forum › ProOrder support › "Ghost operations" with low TF robots
- This topic has 36 replies, 5 voices, and was last updated 4 years ago by
GraHal.
-
-
07/01/2020 at 11:10 AM #137886
Hi,
Recently I have discovered that several of my systems produce strange “ghost operations”. This operations OPEN AND CLOSE IN THE SAME SECOND and always with losses than can go from a few euros to 61€ in one case. See image attached for examples.
It seems to happen only in robots with a low TimeFrame, from 2m to 5m. And it doesn´t happen in backtest. I don´t think is a problem with the code because it happens with very different systems and only with the low TF. Until recently all my systems were 10m or higher TF and with these it never happen before.
I have put a ticket in PRT but I needed several mails only to get them to understand the problem and from my past experience I don´t expect much from them.
I´ve been trying to discover the cause from the code and it hasn´t any sense to me. Furthermore as I said before I use the same “style of code” with higher TF and it doens´t happen there. I can only think is a problem with the plataform
Does this happen to anyone else? Any idea what could be the cause?
07/01/2020 at 11:27 AM #137892I’ve had it in the past and it was where my code was flawed and it was buying and selling / vice versa instantly due to mmmm … sorry can’t remember! 🙁
What a thing to say, but least you know you are not on your own.
By far the best is to post your code on here and I’m sure a coding wizard will spot the reason?
PS
You not got stops inside the spread have you?
07/01/2020 at 12:51 PM #137906Live or demo account?
I have put a ticket in PRT but I needed several mails only to get them to understand the problem and from my past experience I don´t expect much from them.
I think that you are talking about your broker’s assistance desk? Which is IG?
07/01/2020 at 4:18 PM #137965Thanks Grahal for the support! 🙂 At the begining I thought the same, that it should be a problem with the code but I´ve been programming with PRT for several years now, I am used to find errors in the code and here I can´t see the problem. As it happen in different systems but only with low TF, and the higher TF systems have similar code for entries and exits and doesn´t happen made think that it could be something else, not the code. Also it doesn´t happen in backtest only in Live.
Nicholas, it happened in Live. Now I have put these systems in Demo to see if it happens also there.
It´s also interesting that I shared these systems with a mate and he had also “ghost operations” but not the same as me, in different days.
Anybody is running systems in the <5m TF? If nobody else is happenning it should be my code. You can check just looking for the operations with only 1 or 2 candles duration in the report. As I said before these operations open and close in the same second
07/01/2020 at 5:42 PM #137977Anybody is running systems in the <5m TF?
I just checked 3 of my 1 min TF Systems on Demo Forward Test none of them show any ghost bars like yours.
One of the Systems has been running since 3 Feb 20 and has done 140 trades.I also checked 5 Systems running in Real Live, 3 on 1 min TF and 2 on 3 second TF … no ghost bars there either, but they have only been running for a few weeks.
1 user thanked author for this post.
07/01/2020 at 6:51 PM #137993Thanks Grahal, so it looks like the problem is in my code. I will keep looking for the cause…
07/01/2020 at 8:07 PM #13800907/01/2020 at 8:10 PM #138010I just realized something really really weird about these ghost operations…
As I said before these “1 second” operations doesn´t appear in backtest but nevertheless their loss seems to be included in other normal operation in the backtest. For example the same day in backtest there is only one operation with a 100€ loss but in real there is 2 operations: one with a 90€ loss and another one “ghost operation” (open and close in the same second) with a 10€ loss.
The amounts are not exact for backtest and real but aproximately for all the operations I checked it seems that is happening. The images attached are a real case
Now I really don´t understand NOTHING
07/01/2020 at 8:13 PM #138012The backtest operation
07/01/2020 at 8:53 PM #138022Now I really don´t understand NOTHING
Now you / we have to find out what is going on!?
Weirder and weirder!?
07/02/2020 at 9:55 AM #138065I know is really weird but for me to know that backtest match with live even in so strange way is kind of relive.
I don´t know what else to do or check about it. If there is something new about it I will post it
07/02/2020 at 11:03 AM #138073in real there is 2 operations: one with a 90€ loss and another one “ghost operation” (open and close in the same second) with a 10€ loss.
It seems like an IG money balancing transaction due to exchange rates or some other weird thing??
However above assumes that backtest has the correct exchange rate and Real Live does not
I think we have reached the stage where we need to ask IG … keep it simple with minimum words and one screen shot?
You could just say / email to IG …
Please could you explain what is the – 1 second bar – transaction at the red arrow on attached 2 min Timeframe Order List?
Note that there is another transaction at the exact same time -see blow arrow.
07/02/2020 at 12:43 PM #138080This operations OPEN AND CLOSE IN THE SAME SECOND and always with losses than can go from a few euros to 61€ in one case. See image attached for examples.
@TempusFugit, looking at your picture, I highlight the link (for 22-Mar 12:50, there is also another link I didn’t draw it), it seems like maybe your condition is not protected by IF NOT ONMARKET or IF NOT LONGONMARKET, etc…
I had it before when not protecting the condition, I think the code run from top to down, so the code could have fulfill both long and short conditions thus both get executed.
A dummy example like below, the trade can close at the same second sometimes
123456789101112131415M1RSI = AverageTrueRange[14](close)C1 = RANGE > 2 AND M1RSI > 5C2 = RANGE > 3 AND M1RSI > 5// Conditions to enter long positionsIF C1 THENBUY 1 CONTRACTS AT MARKETENDIF// Conditions to enter short positionsIF C2 THENSELLSHORT 1 CONTRACTS AT MARKETENDIF07/02/2020 at 4:32 PM #138120Grahal,
I will try to ask IG as you said. My guess is that they will refer me to PRT. I will tell
1 user thanked author for this post.
07/02/2020 at 4:44 PM #138124Dow Jones,
You are rigth, the operations are not protected by “NOT ON MARKET” because I want the system to change direction if conditions are met.
My execution code is like:
12345IF LONGENTRY THENBUY AT MARKETELSIF SHORTENTRY THENSELLSHORT AT MARKETENDIFThis way I think it can´t make both long and short entries at the same time. Is that right?
Anyway because of the conditions of entries in this system I don´t think is possible to have both long and short entry at the same candle. But just came to me that I can check that in backtest with the DRAW function just in case
-
AuthorPosts
Find exclusive trading pro-tools on