London Open Breakout
Forums › ProRealTime English forum › ProOrder support › London Open Breakout
- This topic has 16 replies, 4 voices, and was last updated 5 years ago by othello.
Tagged: break out, BreakOut, london, london open breakout
-
-
09/10/2019 at 3:33 PM #107067
This code, applied to the EurUsd with time frame H1, does not always produce the correct behavior.
The logic of the operation should be well described by the comments in the code. If necessary, however, I am here to integrate the missing information.For example, on August 29th (candle at 7:00 pm) last, he makes a sale and a purchase, inside the same candle. But in the previous candle the conditions for entering the market were already false.
Another example is that of last September 2nd (7:00 am candle): all three conditions are verified and in the next candle a sale should take place as there is a rupture of the lower end of the canal. But this does not happen.
Can anyone help me understand?
Thank you.London Open Breakout12345678910111213141516171819202122232425262728293031323334353637383940414243444546Defparam cumulateorders = false// At 5 am I define the width of the canal (RangeBreakout) and its extremes (HH and LL)// Furthermore, I set the TradeLong and TradeShort variables to zeroIF TIME = 050000 THENHH = highest[8](high)LL = lowest[8](low)TradeLong = 0TradeShort = 0RangeBreakout = HH-LLENDIF//I define the condition that requires working in a specific time intervalCondtime = time >= 050000 AND time <= 180000// I define the condition that requires the closing price to be inside the channelCondchannel = close < HH and close > LL// If the Condchannel and CondTime conditions are met ...IF Condtime and Condchannel THENIF TradeLong = 0 THENbuy at HH stop //... and if the system is not Long, then buy at the breaking of the upper end of the channelELSIF TradeShort = 0 THENsellshort at LL stop //... and if the system is not Short, then it sells at the breaking of the lower end of the channelENDIFENDIF// If the position is long, set the value of the TradeLong variable to 1IF longonmarket THENTradeLong = 1ENDIF// If the position is short, set the value of the TradeShort variable to 1IF shortonmarket THENTradeShort = 1ENDIF// Set a stop loss equal to the width of the channelset stop loss RangeBreakout// Set a profit equal to a percentage of the channel widthset target profit RangeBreakout*Tgtgraph Condtimegraph Condchannelgraph TradeLonggraph TradeShortgraph HHgraph LL09/10/2019 at 3:50 PM #10707309/10/2019 at 3:53 PM #107075Try below for Lines 20 to 25 (addition of not short / long onmarket)
1234567IF Condtime and Condchannel THENIF not shortonmarket and TradeLong = 0 THENbuy at HH stop //... and if the system is not Long, then buy at the breaking of the upper end of the channelELSIF not longonmarket and TradeShort = 0 THENsellshort at LL stop //... and if the system is not Short, then it sells at the breaking of the lower end of the channelENDIFENDIF09/10/2019 at 3:54 PM #10707609/10/2019 at 3:59 PM #107077On Aug. 29th no trade entered (EurUsd, 1H).
Are you sure about dates and times?
Please attach scrrenshot to be able to see:
– wrong trades
– price
– instrument
– date
– time
09/10/2019 at 4:10 PM #107078Thanks GraHal, your fix won’t solve my problem. It has the merit, however, of having pointed out to me other errors in the code (one of these is that the width of the channel is modified during an operation).
1 user thanked author for this post.
09/10/2019 at 4:12 PM #10707909/10/2019 at 4:24 PM #10708009/10/2019 at 4:39 PM #10708409/10/2019 at 8:44 PM #107120I get attached at Spread = 4
I thank you for the insights you gave me. It is really interesting to make the extremes that define the hourly trading interval vary.
For the rest it seems to me a strategy on which there is still much to work.
But aren’t 4 spread points excessive?09/10/2019 at 10:39 PM #107135But aren’t 4 spread points excessive?
On the DJI, spread is never lower than 1.6 and does go to around 4 between 23:00 and 01:30 so unless a System trades only during times when spread = 1.6 then I use spread = 4. Also there are overnight costs etc so spread = 4 for DJI goes some way towards covering these also.
I feel it is better to be a worst case re costs in Demo then maybe costs will be less and a pleasant surprise in Live trading! 🙂
09/11/2019 at 3:25 AM #10714209/11/2019 at 9:08 AM #107160A good test is to remove spread altogether and then re-test the strategy several times slowly adding it back in up to an extreme value such as GraHal suggests. You should see a slowly decreasing performance as less trades get opened and spread hits profits more but your strategy should not break completely.
09/11/2019 at 9:35 AM #10716309/11/2019 at 10:50 AM #107173(I think of other underlying assets) is to discard systems that could prove profitable
I don’t use spread = 4 on all markets, for example on eurusd I use spread = 2 as eurusd is mostly spread = 0.6 during the day .
-
AuthorPosts
Find exclusive trading pro-tools on