Does any Code Execute mid-Timeframe?
Forums › ProRealTime English forum › ProOrder support › Does any Code Execute mid-Timeframe?
- This topic has 9 replies, 3 voices, and was last updated 8 years ago by Nicolas.
-
-
07/23/2016 at 7:43 PM #10829
I am getting ‘sick to death’ of waiting for the ‘PRT Techie Elves’ to sort the issue re ‘Stops and Targets producing Utopian Equity Curves on Backtest’ etc.
In BACKTEST is there any code that executes mid-Timeframe to get us out of a trade at a predetermined Target Profit or Stop Level?
I am thinking here of Buy/ Sell at Price Limits and Price Stops?
On Backtest … surely a ‘Sell Stop’ at X Price doesnt wait until the end of 4 hour bar to ask … during that 4 hours did the price reach X Price? Yes … close the trade at X Price (even though by the end of the 4 hour bar the Price may have gone back up / down again and the trade is now back in Profit!).
Even reading above it sounds ludicrous, but that is what happens re ‘Points Stop Loss’ and ‘Points Profit Target’.
We need a rebellion / a signed petition to shake those PRT Elves into telling us when the ‘0 Bars’ issue will be sorted?
We are the Customers / Users / Clients and what is happening now (no target date re major platform issues) is not good Customer Service!?
Hope above makes sense, if not just say?
GraHal
07/24/2016 at 8:40 AM #1083107/24/2016 at 9:34 AM #10833Thanks Grizzly, not a 100% solution though … the same illogic happens re the ‘o bars showing profit’ happens, but I agree 1 minute timeframe does compensate to some extent.
The point is though there is enough ‘natural’ differences between Backtest and Demo / Live without this ‘unnatural / illogic PRT o bars issue’ making life more difficult and our profits less!
Cheers
GraHal
07/24/2016 at 12:43 PM #1083907/24/2016 at 1:05 PM #10840Hi Grahal – could you share an example of where you are finding differences between backtest and live ?
I personally have found this to be the case. HOWEVER, i quickly realise its because of:
- Live Spreads fluctuate. Backtested spreads do not.
- Code is almost always Time Frame SPECIFIC. HFTs are called HFTs for a reason. Value Investors are called Value investors for a reason. I would believe the PRT community is somewhere in between.
- Code is too focused on entry and execution rather than riding the larger trend.
- Finally, everyone here complains of ‘0 bars’. This matter can EASILY be circumvented by inserting “RULE 1 = (Barindex-tradeindex)>=1” into all entry and exit conditions.
Cheers
Grizzly
07/26/2016 at 11:55 AM #10881Hi Grizzly, thanks again, I tried it but I still got loads of ‘0 bars’ … by which I mean as shown below.
At the risk of saying / showing something daft, I’ll keep on this one until I am clear in my head.
Attachments are Results …
- Without Grexit (Grizzly Exit! ha) strategy
- With Grexit strategy.
- Equity Curve with Grexit Strategy
And here’s the c0de
PS I’m begining to think I should have given this Topic a different title?
123456789101112131415161718192021222324defparam cumulateorders=falsedefparam preloadbars=2000defparam flatbefore=090000defparam flatafter=213000Rule1 = (Barindex-tradeindex)>=1mycompra, myventa = CALL "ALEX ATB Indicator"ema=ExponentialAverage[8](close)advance=abs(round(ema-ema[1]))mylot=min(1000,(((Strategyprofit+3000)*0.02)/30))if not longonmarket and mycompra=1 and Rule1 thenBuyPrice = ema+advancebuy mylot contract at BuyPrice limitendifif not shortonmarket and myventa=-1 and Rule1 thenSellPrice = ema-advancesellshort mylot contract at sellprice limitendifIf Rule1 thenset stop ploss 30set target pprofit 25endif07/26/2016 at 12:04 PM #10886Re above … running on a 3 hour timeframe (03:00, 06:00, 09:00 bars etc) … why did a trade execute at 10.10 this morning??
See attachment for time and also the same trade but on a 5 minute timeframe to show the trade time and price movement since 9 oclock.
07/26/2016 at 12:06 PM #1088907/26/2016 at 12:08 PM #1089207/26/2016 at 3:05 PM #10901Hey folks, i’m on leave actually, but I saw your first post GraHal 🙂
I can tell you that the ‘PRT Techie Elves’ are working hard. It’s almost done.. “almost” because not released yet to public.. Believe me that this feature with other nice ones will come sooner than expected. This is all I can say (and know), so don’t ask “when” please 🙂
2 users thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on