Trading Strategy – Buy at Market on nth occurrence of Lower Low
Forums › ProRealTime English forum › ProOrder support › Trading Strategy – Buy at Market on nth occurrence of Lower Low
- This topic has 6 replies, 4 voices, and was last updated 3 years ago by GraHal.
-
-
09/10/2021 at 11:46 AM #177199
Hi Nicolas
I would appreciate some guidance on coding a strategy that will buy at market on the nth occurrence of a Lower Low (LL). See picture attached for my expectaton of a Lower Low.
In english i’m looking for somthing like this:
Lower Low can be a variation of “low[5] > low[4] and low[4] >= low[3] and low[3] >= low[2] and low[2] < low[1] and low[1] < low[0]”
Start with setting the variables LL1 to LL5 to 0
Next
1st occurence of a LL set LL1 = Price of Low[2] within the Lower Low
In between each lower lower there will be a Lower High (which could be the opposite of the description of the Lower Lower above).
2nd occurence of LL set LL2 = Price of Low[2] within the 2nd Lower Low
3rd occurence of LL set variable LL3 = Price of Low[2] within the 3rd Lower Low
Then buy when LL3 is <> 0
Then when on market set LL variables back to 0 and start again.
Thanks for our support in advance.
Steve
09/10/2021 at 5:43 PM #177221Hello,
The signal is clearly in the style of Williams’ fractals.
To keep track of previous signals, I believe you can play with intermediate variables, and a table to log LL values. Something like this (not tested):
Remark: not sure why there is a need for 5 variables and why LL3 should be initialized if it is set to 0 just afterStore LL values123456789101112131415161718192021once HHcount = 0once LLcount = 0cLL = ... // Put here the conditions for LLcHH = ... // Put here opposite conditions for HHIF cHH and HHcount=0 THEN // Detect a swing high as intermediate signalHHcount=HHcount+1ENDIFIF cLL and HHcount>0 and LLcount<2 THEN // Initialize the first 2 variables when there is a swing lowLL[LLcount]=low[2]LLcount=LLcount+1HHcount=0ENDIFIF cLL and HHcount>0 and LLcount=2 THEN // Action on third swing lowBUY xxx // Put here BUY instructionsLLcount=0HHcount=0ENDIFPS: when do you plan to sell?
09/11/2021 at 9:23 AM #17723709/11/2021 at 9:34 AM #17723809/13/2021 at 9:00 AM #17737509/13/2021 at 9:21 AM #17737809/15/2021 at 11:42 AM #177623 -
AuthorPosts
Find exclusive trading pro-tools on