Conditions on number of trades, reversing trade direction
Forums › ProRealTime English forum › ProOrder support › Conditions on number of trades, reversing trade direction
- This topic has 37 replies, 4 voices, and was last updated 2 years ago by
PeterSt.
-
-
11/14/2022 at 1:44 PM #20414611/14/2022 at 3:56 PM #204155
My original response would have been a different one and all can can say now is :
When in trial mode, the data would indeed be based on IB’s data (thank you Roberto). There should not be a difference between V11 and V12 … BUT :
Ever back I heard (from Support) that the database would be different (as in overhauled) which should be an improvement over V11 because of more possibilities (in to this topic unrelated areas AFAIK). Also, I may expect differences in the “under 1 minute” timeframes because of the knowledge that PRT-IB (PRT-IG the same ??) has no database for “seconds” which is a huge lacking. IOW, you may expect differences with “seconds” TimeFrames (this is also 150 seconds and more which can not be divided by 1 minute) … but this is all maybe not what you experience. And, if it is about points difference, look at the example below for Nasdaq vs Nasdaq where left is IG with CDFs and right is IB with real Futures. An easy difference of 35 points.
Now please notice that it is IB with the real data (right) and IG with derived data. Now ask yourself what you compare with.
Do notice that in your own chart you can look for the same time and compare points (the price level). You can see the time scale at the bottom. Is yours – from V12 – the same ? then your other source could be “IG-like” and it is “created”/fake.
The IB data is real, even when it would be CFDs (like Fx stuff).My original response was about IB Demo (Papertrading) and how that does not compare at all to Live or Paper of IG these days. But I now think this is not the source of your issues, although I would describe that as a mess, literally.
Please notice that Live Autotrading with IB is not possible (yet). That would require IG …1 user thanked author for this post.
11/14/2022 at 8:44 PM #204173PeterSt, thanks, much appreciated!
Given that:
1. I can’t trade live algo with IB
2. I can trade live algo with IG but there are issues on timeframes less 1 minute and moreover because of CFD there is another price for future (might be the same behaviour for ES as for Nasdaq)Nevertheless, I sstill finding some issues with backtesting and I need some help here.
What I have for entering and closing trades
12345678910111213141516171819202122232425262728293031323334353637383940414243444546IF Close > HighO + TickScale AND count = 0 THEN//BUY PositionSize CONTRACTS AT BuyLevel STOPBUY PositionSize CONTRACTS AT MARKETSET TARGET pPROFIT RangeOpen*ScaleReward//SET STOP LOSS StopLong//SET STOP PLOSS StopRiskCntLong = CntLong + 1count = count + 1ELSIF Close < LowO - TickScale AND count = 0 THEN//SELLSHORT PositionSize CONTRACTS AT SellLevel STOPSELLSHORT PositionSize CONTRACTS AT MARKETSET TARGET pPROFIT RangeOpen*ScaleReward//SET STOP LOSS StopShort//SET STOP PLOSS StopRiskCntShort = CntShort + 1count = count + 1ENDIFIF POSITIONPERF(1) < 0 AND count >= 1 AND (LONGONMARKET[1] OR SHORTONMARKET[1]) THEN////LongPrev = LongOnMarket[1]//ShortPrev = SHORTONMARKET[1]IF (CntLong = 1 OR CntLongExtra = 1) AND NOT OnMarket THENSELLSHORT PositionSize CONTRACTS AT MARKETSET TARGET pPROFIT RangeOpen*ScaleRewardExtracount = count + 1CntShortExtra = CntShortExtra + 1//SET STOP PLOSS StopRiskELSIF (CntShort = 1 OR CntShortExtra = 1) AND NOT OnMarket THENBUY PositionSize CONTRACTS AT MARKETSET TARGET pPROFIT RangeOpen*ScaleRewardExtra//SET STOP PLOSS StopRiskcount = count + 1CntLongExtra = CntLongExtra + 1ENDIFENDIFIF LONGONMARKET THENsell at StopLong stopENDIFIF SHORTONMARKET THENEXITSHORT at StopShort stopENDIFI debugged Stoplong, and for one of the date, stop was not triggered, see the screen. Any ideas?
11/15/2022 at 6:09 AM #204189This is the THIRD incarnation of an attempt of a post which would make sense. The other two were much longer. This one sticks to this only :
How on earth is a Stop shown (the StopLong variable) at the price of 3,772.25000 while the price at that moment is 3,773.50 which is higher ??
Only when you have a command like this :
1GraphOnbPrice 3,772.25000 as "StopLong"such a thing could happen.
The Up and Down blue arrows also are not consistent (I have never seen that kind of inconsistency)
Can you please tell (again) : is this from PRT-IB ? If so, ditch it. As I told or implied, it is unworkable. What I did not tell is that this is all in the area of pending orders (Limit and Stop). That it could show a graph like I just wondered about (the StopLong lower price showing higher than the price – or am I blind ?) is something I never saw but also still can’t imagine.
PS: I don’t think there is a seconds (TF) issue in IG other than in IB. It would be true that the backtesting data in IG is “less” into history (less bars). IG is just a mess regarding the amount of history and all regarding “seconds” is just way too few of it. And Yes that imposes a problem with backtesting. So much so that you better apply trickery that allows backtesting with 1minute TF and later inject parts with seconds (Multi TF) which don’t require backtesting any more.
Please do remember that AutoTrading with IB does not work anyway, and if you ask me it is a year or more away from us (more than countless anomalies – I would not know where to begin to describe them – many related to the way IB works vs IG, while all has been made for IG (‘s possibilities)).1 user thanked author for this post.
11/15/2022 at 4:27 PM #204225Hi, Peter
Sorry if I confused you, but the point is that Stop which is 3,772.25000 was higher then actual price, look at red rectangle. I just highlighted entry price, then red rectangle where stop should be triggered, but now, no luck. So, just to clarify again, entry price was 3775, stop was for 3772.25, price in red rectangle was lower than 3772.25, as a result I expected that stop loss will be triggered – but no luck.
As per data: I’m using trial realtime access, I don’t know what is exactly the provider for that.
Regarding IG – after showing by you such difference in CFD and IB, I don’t want to trade this, to be honest, trying to find more apropriate broker for futures trading, coz IB has high margin requirements.
11/15/2022 at 5:25 PM #204226I am afraid that this all can not be verified. Only when you post a fully working .itf with the parameters (like StopLong) set fixed and again such a screencopy of the chart with a little aiding text, people can copy the behaviour and look for culprits.
🙂The real issue may emerge that nobody (or hardly anybody) in here will be able to run your system in the IB environment because people have PRT-IG – not IB.
All combined with my advice to ditch PRT-IB in the first place, leads to nothing if you stick with that. I mean, I won’t help out with this because I already know it s*cks.Sorry … 🙁
11/15/2022 at 5:32 PM #20422711/16/2022 at 8:07 AM #204241 -
AuthorPosts
Find exclusive trading pro-tools on