How to program a Limit Order as % of yesterdays range. Winning Bond System
Forums › ProRealTime English forum › ProOrder support › How to program a Limit Order as % of yesterdays range. Winning Bond System
- This topic has 24 replies, 2 voices, and was last updated 7 years ago by Bard.
-
-
03/23/2017 at 7:41 PM #2968603/23/2017 at 8:19 PM #29693
About your example, the green candle was bullish, it was an inside day so we took decision to trade in the white hammer candle the day after (at close), the order limit put at the open of the long doji candle has been succesfully fulfilled at “buylevel” calculated by the green candle that generate the signal. Everything is in concordance with the strategy, for me 🙂
03/23/2017 at 11:17 PM #29713Then maybe the confusion is that I thought the original intention of the creator of the system was to have the day of the trade being the day after the inside day/bullish candle, and a trade only occurring if there was a strong open the next day above the previous high? The gapping up was the white hammer candle, that is the day that the trade should have occurred, no? It doesn’t help that the author uses “today” whereas PRT works with yesterday!”
A) Hence: “I don’t know understand why this 6th Oct 20018 trade is being placed when the bullish day condition is not met (it’s a white candle) (a white hammer)”
This is like some kind of Zen mind trick….. so please see my screenshot A, to help. (-:B) And my first observation in the post #29677 :
“Just to clarify the current exit rule is to “Sell at Market” and that it is selling on the first profitable Opening? Only, the screenshot shows the trade did not exit at the profitable open but instead took a loss because it sold at the low of that same white candle? i.e. it should have been exiting where that orange x is with a profit.”I see the problem again, the PRT system is waiting a day after the gap day and then taking the trade. Even though it does take it “late,” shouldn’t it be exiting on the orange x (open with a better price than exiting after the price has crashed down — (it’s taken the trailing stop exit here of 50 tics))?
The Bond system had 95% accuracy and I think these differences in interpretation may be why it’s only achieved 75%,.. maybe?
Sorry to reiterate: “If the Bonds are quoted in US dollars then how do you keep the number of shares fixed to the £/$ Exchange rate?”
Eleven days ago when we were re-creating this Bond system the exchange rate was £1 – $1.22. Now today it’s £1-$1.25 and so it should have really bought 125 shares?If this system can be resolved, then I can – with help – get the other two or three auto pattern systems created, as Beann advised readers to run these systems simultaneously for robustness, diversification, less stress with long drawdowns and a smoother equity curve. I can then also see how these patterns work on the Forex / Indices and they can all be posted under one topic.
The simpler a system is and the less parameters the more likely future profits will match test results.
03/27/2017 at 3:19 PM #30004The problem is that we need to know if today has a gap and we can’t know it until the end of the day (at Close). If the gap occurred, the limit order will be only put the next day at Open, so it might be too late already.
The system already sell if the trade is in profit, but this test is also only done at the end of the day. So if a negative gap occurred at Open of the next day, the trade may be in loss but the system close it because decision was made the day before.
The exchange rate can’t be retrieve by the code, we do not have multi instrument support to know the GBPUSD rate to properly calculate the amount of shares needed. You can only do it once, when you launch the strategy with predefined variable, for instance : GBPUSD=1.26
1 user thanked author for this post.
04/02/2017 at 9:55 PM #30758I have the code behind this system and it was written as:
12345if (High[1]>High and Low[1]<Low and Close>Open and nextbar Open>=HighBuy 1,h-0.15*(High-Low), “limit”, “onebar”);entry_price=barnum+1entry_price=High-0.15*(High-Low);entry_type; # buy limitIt looks like what has been posted above in this thread, yet it seems strange that PRT can’t calculate the “
nextbar Open>=High"
until the end of that open candlestick period?
I also have 20 or so trades that although the “GRAPH golong” signals the right conditions, trades are not taken and I’m not sure why? Pls see screenshot.
Also I have the full winning Bond trading system code. It uses 19 patterns like Island Reversals, Breakaway Gaps, Stair Patterns (the inside day posted above is pattern #2), so I don’t know if this will overload you with work? Vince’s Optimal F position sizing theory can be added to the forums but I can’t add this trading system code here because the pdf won’t allow me to copy and paste it. I could email you the pdf book? It’s full of trading systems and their respective code and the chapter on Optimisation will definitely interest you!
I realise that there is still the Kase Peak Oscillator and Case Con/Divergence coding request too — which I feel is still worth coding as she achieves a statistically significant 85% entry signal accuracy – sorry for the not so subtle “sales tactics” re: the Kase coding request (-; – I just hope this is not overloading you with work?
Best
Bard04/03/2017 at 1:12 PM #30822The signals may be good, but the pending limit order don’t trigger the day it is set. Pending order only last 1 bar. So in order to put them for a longer period, we have to decide how much time they need to be set.. Do the author of the strategy talk about expiration of the limit orders?
1 user thanked author for this post.
04/03/2017 at 11:03 PM #30896That must be it: The limit order conditions weren’t fulfilled. The author set the limit order to come after the inside day & bullish candle. Maybe by waiting eg 3 days the systems accuracy would decrease? Still, if you added that extended limit order condition (eg 3 days) I can check out and test the results?
So to confirm re: Entry signals, the PRT code can’tt identify the:
123nextbar Open>=High<span class="token keyword"></span>(bullish gap) and buy that candle after the conditions have been met, i.e. an inside day/bullish candle) because it needs the end of bar data? And that the same applies to the Exit? i.e. it cannot exit on the first profitable opening? In Beann’s code he writes that the system must be run on day session data only and that “#Gaps are important. If you run it on “full session data” results will be questionable with this exit approach.” Full session data?
Would it be possible to write the code that would be needed to buy at a fixed exchange rate? (Let’s hope there isn’t another large plunge in the £/$ as the system might need to be turned off and amended for the number of shares it buys).
It also turns out there were 19 patterns! in this system – these were created to mitigate the long drawdown periods of pattern #2 (inside day). The patterns include, Island Reversals, Breakaway Gaps and Stair Patterns. I’m going to email you a “gift” (as I cannot copy and paste)…. depending if your sanity/patience lasts long enough to code it, (-; Btw, Did you get a chance to look at the Kase Peak Oscillator and Con/Divergence code? It took me hours to go through web trading forums and find the best code, lol.
04/03/2017 at 11:44 PM #30897p.s. I’m reading more of Beann’s code, it seems his platform also did have issues tracking exits on the next profitable open and he has added code to remedy this. The same applies for profitable open exits, past the first bar that they were meant to exit on and so there’s code to exit later. Please see my email.
Best
Bard04/04/2017 at 2:00 PM #31000I changed completely the way it trades. You can now launch this strategy in an intraday timeframe (1 hour for example) and see how it goes. It will trade the daily timeframe setup but in an intraday one, I just realise that it should solve all our problems .. The ‘buylevel’ is now the same as the code you provided (please do your own test, I didn’t myself).
I did not receive any email from you!, if you want me to get back on previous queries, please up the topics, I spend my days answering the “last 3 days posts” 🙂
1234567891011121314151617181920//NOTE: this version should be launched on an intrayday timeframe!!Defparam Cumulateorders=falseinsidebar = Dhigh(1)<Dhigh(2) and Dlow(1)>Dlow(2)bullishbar = Dclose(1)>Dopen(1)gap = Dopen(0)>Dhigh(1)buylevel = DHigh(1)-(Dhigh(1)-Dlow(1))*0.15golong = insidebar and bullishbar and gapif golong and intradaybarindex=0 thenbuy 122 contract at buylevel limitsavedate=Dateendifif onmarket and Date<>savedate and positionperf>0 thensell at marketendif04/04/2017 at 3:45 PM #31011 -
AuthorPosts