Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Create scan: MACD Cross overs Topic Rating:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Skyla777
Posted : Wednesday, March 13, 2013 11:29:28 PM
Registered User
Joined: 2/9/2010
Posts: 50

I would like to create a scan on 2 MACD and Histo bars

1. MACD settings 12, 26, 9

I am looking for when the MACD line crosses above and below the zero lin

I am looking for the MACD line to be leading or nearly leading the histo bars

I am looking for for same thing on these setting:

2. MACD and Histo 12, 200, 15 

I will be using these on 

Daily

4 hour

5 min 

1 minute

I am also looking for a trigger scan on Both of the MACD settings when :

  • the  MACD crosses above or below its signal on both MACD settings above
  • I would like to be able to have an alarm that tells me they tirggered

 

 

Bruce_L
Posted : Thursday, March 14, 2013 11:06:36 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

For "leading or nearly leading", I am going to assume that the MACD needs to be on the same side of the crossover and the MACD Histogram during the bar of the crossover. If you have a different unambiguous objective definition in mind, we can try to implement it instead.

Exponential MACD Histogram 12,26,9 crossing through zero in either direction with MACD leading or nearly leading:

Understanding MACD

SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) <> SGN(XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)) AND SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) = SGN(XAVGC12 - XAVGC26)

Exponential MACD Histogram 12,200,15 crossing through zero in either direction with MACD leading or nearly leading:

SGN(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)) <> SGN(XAVGC12.1 - XAVGC200.1 - XAVG(XAVGC12.1,15) + XAVG(XAVGC200.1,15)) AND SGN(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)) = SGN(XAVGC12 - XAVGC200)

Exponential MACD Histogram 12,26,9 and Exponential MACD Histogram 12,200,15 both cross through zero on same bar:

SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) <> SGN(XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)) AND SGN(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)) <> SGN(XAVGC12.1 - XAVGC200.1 - XAVG(XAVGC12.1,15) + XAVG(XAVGC200.1,15))

Exponential MACD Histogram 12,26,9 and Exponential MACD Histogram 12,200,15 on same side of zero this bar, but at least one was on the opposite side of zero during the previous bar:

SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) = SGN(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)) AND (SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) <> SGN(XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)) OR SGN(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)))

You can change the Time Frame of the Condition Formula when it is created or edited. You can also add multiple copies of this formula to the same EasyScan and then set the Time Frame of each Condition Formula to the desired Time Frames if you want to check for multiple Time Frames simultaneously.

Building a Scan with Multiple Conditions

Note that when you use a Condition Formula in your Layout, it creates a copy of that Condition Formula which is not linked to the original in any way. So if you change the original and want it to be adjusted in the Layout as well, you would need to remove it from the Layout and then re-add it after making the changes to the original Condition Formula.

You can create Condition Alerts using any Condition which you have saved by More | Alerts | New Alert | Condition Alert. Note that Alerts are created on a symbol by symbol basis however and do not scan an entire WatchList at a time as is done in an EasyScan.

Setting Alerts
Monitoring Alerts



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Skyla777
Posted : Thursday, March 14, 2013 8:03:22 PM
Registered User
Joined: 2/9/2010
Posts: 50

Bruce , can you please take down the pictures in the email above, one was not from a public space and I feel I should not leave on the discussion!  If you could do this ASAP I would really appeciate, just take off all links to all pics! Regards, Shannon 

StockGuy
Posted : Thursday, March 14, 2013 10:20:00 PM

Administration

Joined: 9/30/2004
Posts: 9,187

QUOTE (shannon.3330)

Bruce , can you please take down the pictures in the email above, one was not from a public space and I feel I should not leave on the discussion!  If you could do this ASAP I would really appeciate, just take off all links to all pics! Regards, Shannon 

 

Done.

Skyla777
Posted : Thursday, March 14, 2013 10:31:52 PM
Registered User
Joined: 2/9/2010
Posts: 50

Thanks so much bruce! I really appeciate and send apologies for the xtra work! Do you know if there are any scans that are built esp for FX taders? I am just expaning into FX. Also, can order off the chart with any brokers ie, Interactive Brokers? Shannon 

PS MANY MANY THANKS

Skyla777
Posted : Thursday, March 14, 2013 11:25:03 PM
Registered User
Joined: 2/9/2010
Posts: 50

Bruce, is that code MQL? i think not, but thought i would ask! 

Thanks

Shannon

Skyla777
Posted : Friday, March 15, 2013 12:10:09 AM
Registered User
Joined: 2/9/2010
Posts: 50

Bruce, I was looking for the MACD line to be in front of the histo bars as  it crosses up or down fro ZERO line...is it possible to set up an alert when the MACd's the zero line in front of descending or ascending histo bars, that may be too picky! Thanks so mych as usual...

THe ones markes X have the MACD line  crossing the zero line in the middle of the histo bars where as the checked ones are at the place I would like to scan for,

Shannon 

 

http://imgur.com/EsC8xWM

Bruce_L
Posted : Friday, March 15, 2013 7:02:33 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The Condition Formulas are written using the Personal Criteria Formula Language. This is not MQL.

We can add the requirement that the MACD line cross first instead of possibly on the same bar. I only allowed possibly on the the same bar because this seemed to be the case in the images and because of the use of the term "nearly leading".

Exponential MACD Histogram 12,26,9 crossing through zero in either direction with MACD leading:

SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) <> SGN(XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)) AND SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) = SGN(XAVGC12 - XAVGC26) AND SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) = SGN(XAVGC12.1 - XAVGC26.1)

Exponential MACD Histogram 12,200,15 crossing through zero in either direction with MACD leading:

SGN(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)) <> SGN(XAVGC12.1 - XAVGC200.1 - XAVG(XAVGC12.1,15) + XAVG(XAVGC200.1,15)) AND SGN(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)) = SGN(XAVGC12 - XAVGC200) AND SGN(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)) = SGN(XAVGC12.1 - XAVGC200.1)

In looking at your most recent image however, I may be misunderstanding your term leading. You may just mean that the magnitude of the MACD is greater than the magnitude of the MACD Histogram. In which case you would get:

Exponential MACD Histogram 12,26,9 crossing through zero in either direction with MACD leading:

SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) <> SGN(XAVGC12.1 - XAVGC26.1 - XAVG(XAVGC12.1,9) + XAVG(XAVGC26.1,9)) AND SGN(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) = SGN(XAVGC12 - XAVGC26) AND ABS(XAVGC12 - XAVGC26 - XAVG(XAVGC12,9) + XAVG(XAVGC26,9)) <= ABS(XAVGC12 - XAVGC26)

Exponential MACD Histogram 12,200,15 crossing through zero in either direction with MACD leading:

SGN(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)) <> SGN(XAVGC12.1 - XAVGC200.1 - XAVG(XAVGC12.1,15) + XAVG(XAVGC200.1,15)) AND SGN(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)) = SGN(XAVGC12 - XAVGC200) AND ABS(XAVGC12 - XAVGC200 - XAVG(XAVGC12,15) + XAVG(XAVGC200,15)) <= ABS(XAVGC12 - XAVGC200)

That said, I do not even see a cross where the MACD would be "leading" the MACD Histogram in the fourth circle (the second with a green check) in your example image. The cross of the MACD Histogram seems to have happened far before the cross of the MACD (as it does in the first and second circles, but those got red Xs).

Any further adjustments to the formula will require a specific unambiguous objective definition of "nearly leading" and not a subjective "I know it when I see it" definition as I am obviously misunderstanding something in your examples. You can use images to clarify the definition, but the definition itself must be unambiguous and objective.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Skyla777
Posted : Friday, March 15, 2013 8:42:02 PM
Registered User
Joined: 2/9/2010
Posts: 50

Bruce, I think you have it, sorry for the ambiguity, I will try on scan today! S

Skyla777
Posted : Friday, March 15, 2013 8:50:02 PM
Registered User
Joined: 2/9/2010
Posts: 50

Bruce, one last scan if possible. I have provided a link below. On the picture I am wanting to create an 

Sk SD indicator as per the bottom of the chart in the link. Is there a code for that indicator ? many thnks for all your hard work and hopefully I wont bother you for a long time! 

S

http://imgur.com/PBJ1QrI

Bruce_L
Posted : Friday, March 15, 2013 10:20:37 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

I would need to know the settings of the Stochastic to create a Condition Formula for the %K and %D crossing each other (assuming that is what is of interest in the image).

Understanding Stochastics

That said, you can create a Condition for the %K crossing up through the %D or a Condition for the %K crossing down through the %D by adding the Stochastic to your chart, adjusting its its settings as desired and then clicking on the %K and selecting Create Scan Condition. You would then use the Condition drop down menu to choose the desired Condition from the list.

Create Conditions from Your Chart



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.