Top Bottom/Top Top Scan & Plots


Category:
0
0

Hi Pete,

Giving by the topic, I assume you know the headaches involved in my question.  However, I think I am able to answer some of your questions & also found a study online that partially works, but need your help translating it.  Ill try to address some of your previous questions as far as when pattern completed & number of bars, can you make the inputs adjustable so that the pattern would be completed based on bars specificied (i.e. between the previous 50 bars to previous 4 bars) & doubles are within a percentage.  The code I found below seems to be onto something, but I\’m unable to plot it to get the full picture.

Marked as spam
Posted by (Questions: 3, Answers: 23)
Asked on July 10, 2017 7:16 am
999 views
0
Private answer

There are two separate sets of indicators in that code you posted.

The first one contains numerous errors. Simple mistakes like using a single ‘=’ where a double ‘==’ is required by the syntax. But there are other, more serious mistakes and there is no way to guess what the author intended to write in those cases.

The second one is incomplete. It may be that you ran out of space in the comment section and the rest was truncated. With code of this size, best to save it as a .txt file and attach it to the question.

You can try attaching the full code as a text file. But if these errors are still present there is nothing I can do with this code.

Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on July 10, 2017 8:30 am
0
The link above is no longer valid. Please see my answer dated 12/18/2020 for the original source code that was used for my answer dated 7/11/2017.
( at December 18, 2020 12:31 pm)
0
Private answer

Ok, now that we have the original source code. I find that the code from that post works just as it is. There is no need to modify it to plot on a chart. See screenshot attached. So now that we have a functioning indicator, which of the plots did you want to use for the scan?

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on July 11, 2017 7:53 am
0
I have added a new answer to the question and included that source as an attached plain text file.
( at December 18, 2020 12:32 pm)
0
Private answer

Is there a way to plot a signal (arrow or line) when there’s a double top or double bottom?

I realize different time frames will need different settings & different % of top/bottom differences.  However, I don’t currently understand the inputs or the shortfalls of the current scan.

Could I create text alerts off this scan?  Does this scan create false signals?

Essentially, I’m looking for the best way to create a timely  double top/double bottom signal that would allow to enter a position before the next move.  Possibly adding a plot of arrows when the second top or second bottom is forming.

Marked as spam
Posted by (Questions: 3, Answers: 23)
Answered on July 11, 2017 9:59 pm
0

There are three plot in this code that define the pattern.
firstlow
MidHigh
lastlow_L

The third plot, only appears when the code has detected the last low of the double bottom pattern (which means the pattern is complete). It is either a numerical value, or it is N/A. So we can test for that, using !IsNaN(lastlow_L). However when I applied this technique to a scan and checked the results it did not work. Meaning, the scan picked up stocks where lastlow_L was N/A, even though I instructed it to filter those out.

Even worse, after reviewing over a dozen charts I found the code is very poor at detecting the pattern for which it was designed. I see no value in working with this code any further.

( at July 12, 2017 8:24 am)
0

Any way to do the following?
Input 1TL = 17 bars
Input 2TL = 4 bars
Input 2TR = 1 bar
Input Ticks = 3 ticks

Top1 = highest of the previous 17 bars before Top 1
Top 2 = highest of the previous 4 bars
Alert1 when Top 2 closes within 3 ticks of Top 1
Alert2 when 1 bar after Top 2 closes below Top1 close.

( at July 17, 2017 11:02 am)
0

The pattern you have described can include a straight line of equal closes across all 17 bars. If I knew of a simple way to write this code, I would have already written and published it. Each time I have tried to bring my mind to work out the details, I move along to something easier to accomplish. (you are not the first one to ask for this) I’m certain it can be done. i am also confident someone has already done it. Expect to pay several hundred dollars. I certainly would not do it for less.

I suggest you play around with the code i published here: https://www.hahn-tech.com/ans/flat-base-breakout-scans/

You can probably use it to identify patterns similar to double bottoms and double tops.

( at July 17, 2017 3:04 pm)
0

Thanks Pete! I truly value your guidance & your time. I’m heading back to the chalk board!

( at July 17, 2017 8:38 pm)
0
Private answer

It has been brought to my attention the original source code is no longer available at the link provided by the original author of this post.

I am providing that code as an attached plain text file immediately below this answer. The name of the attached is "DoubleBottom.txt". Click the link by that name immediately below this answer to access that code.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4084)
Answered on December 18, 2020 12:30 pm