Overbought Indicator to avoid top of market retracements
Forums › ProRealTime English forum › ProOrder support › Overbought Indicator to avoid top of market retracements
- This topic has 5 replies, 2 voices, and was last updated 2 years ago by Kovit.
-
-
07/31/2021 at 3:21 PM #174449
Hi guys,
Please can someone help me with some fresh ideas as I have a couple of different reliable strategies but am unable to fully automate them when the price is bouncing around the top of market, positioning trigger is otherwise right but I will normally exit them early in profit to avoid the inevitable retracement into drawdown.
DJI and NIK on a 3min tf would be particularly helpful if I could add a bit of code that would avoid that top range. I’ve tried fibonacci levels, ranges and a few other things but no luck without seriously battering the gain. Last resort would be manually adding the upper resistance price level and working back from that but it would need to be regularly adjusted so was hoping for something a bit more dynamic?
Thanks in advance.
Kovit
07/31/2021 at 4:17 PM #174450The first thing to do is how to determine a top and a bottom.
As you can see from the attached pic, it all depends on the lookback period… around the top of the last 30 bars, 300 bars or 3000 bars?
Once set the lookback period, you need to define AROUND as well. Is AROUND the bottom in that same lookback period? or is it a percentage from the top (at your will or calculated using fibo retracement levels)? or is it a custom number of pips?
Your eyes can easily define all above info, but code cannot, so you have to set rules using accurate numbers to help it detect what you want.
07/31/2021 at 4:38 PM #17445407/31/2021 at 4:59 PM #17445507/31/2021 at 5:37 PM #174458I can code this:
- calculate the highest price within the last N bars
- determine on which lower HUNDRED (final 00) level it sits
- subtract 100 pips from that level (but you can change that number, 1=100, 2=200, etc…)
This is an indicator to add ON the price chart:
1234N = 300 //lookback periodshh = highest[N](high) //highest price since thenHL = (round((hh / 100) - 0.5) - 1) * 100 //replace 1 with any number, even 0.5Return HL as "Hundred Level"This example will enter a Long trade when long conditions are met, provided the price is BELOW the HL:
12345678910DEFPARAM CumulateOrders = falseN = 300 //lookback periodshh = highest[N](high) //highest price since thenHL = (round((hh / 100) - 0.5) - 1) * 100 //HL = Hundred LevelMyLongConditions = Not OnMarket AND close CROSSES OVER average[20]IF MyLongConditions AND close < HL THENBUY AT MarketENDIFSET STOP pLOSS 30SET TARGET pPROFIT 602 users thanked author for this post.
07/31/2021 at 7:26 PM #174468 -
AuthorPosts
Find exclusive trading pro-tools on