Spread Betting Forum | Online Trading Talk-
http://spreadbettingbeginner.com/Forum/

How to detect/scan for Divergence?
http://spreadbettingbeginner.com/Forum/viewtopic.php?f=13&t=99
Page 1 of 1

Author:  Engulfing_Trader [ Thu Jan 27, 2011 8:57 am ]
Post subject:  How to detect/scan for Divergence?

Hello,

I have been using prorealtime EOD, for quite a while & it helps me in my trading, i am planning to subscribe to it to get intraday realtime data..I'm look to scan for a divergence on prorealtime, but i don't know how to code it.

Someone using (CLOSE>=MAC15) and (STO12_K<=30 to scan for stochastic & macd Divergence on IQChart...but i dont know. what code to use to scan on prorealtime for Divergence in Stochastic, Macd, RSI.

It would be helpful, if u anyone can help me out with it...

Thank you

Regards
Raj
Singapore

Author:  SpreadBettingTrader [ Sat Jan 29, 2011 11:49 am ]
Post subject:  Re: How to detect/scan for Divergence?

Hi Raj,
if you go to the prorealtime website at http://www.prorealtime.com/en/, then click on the menu at the top named "Strategies" this will open up a list of scripts you can use with Prorealtime. On the left hand side of your screen there is a menu you can change what you are looking for from 'Indicators', 'Screeners' and 'Templates'. You might find what you are looking for there BUT if not, go to the 'Programming help' menu and you can request the script you are looking for from the Prorealtime programmers for free.
Hope that helps.

Author:  Engulfing_Trader [ Sat Jan 29, 2011 2:48 pm ]
Post subject:  Re: How to detect/scan for Divergence?

Hello,

Thanks for the reply...yes, i know about the stratagies page .. but i didn't find any code there to detect divergence....i wrote to prorealtime, as u said it free, but hasn't received any reply for over 2 weeks now.. they may not reply, as i'm not a subscriber yet.. but hope they reply..

Anyway, thanks again...

Regards
Raj

Author:  SB_Beginner [ Thu Feb 03, 2011 11:01 am ]
Post subject:  Re: How to detect/scan for Divergence?

Hi Raj,

I just want to try and get some more information about what it is exactly you're trying to do. So you want to write a pro screener to screen for divergence in MACD, Stochastics & RSI, Correct?

Are you wanting all three to show signs of divergence or do you want to scan all three indicators individually. What settings do you want to use for MACD, Stochastic and RSI. Are you wanting to scan daily or weekly charts?

Basically I need much more information about what you're trying to do. Post the info and I'll help you out as best I can.

Also, I have written a tutorial for writing stock screeners which may help you onto the right path for writing stock screeners in proRealTime.

Author:  Engulfing_Trader [ Sat Feb 12, 2011 2:47 am ]
Post subject:  Re: How to detect/scan for Divergence?

Hi Harry,

Thanks for you reply.

I look for detecting divergence individually in Macd, Stochastic,RSI, on daily, weekly, could be intraday 4h,1h some times....

I had written about it to prorealtime technical service & they replied with a code to detect divergence...but im unable to get it right....

I will email u the code they sent me & my screenshot of using it, but getting some error message..

I believe, u can fix it & get it right & email me, how to use it properly.

Warm regards
Raj

Author:  SB_Beginner [ Sat Feb 12, 2011 9:05 pm ]
Post subject:  Re: How to detect/scan for Divergence?

Raj,

The code that ProRealTime have sent you is for an indicator not a screener. First you need to create a screener using the code then create a screener using that. The indictor returns a 1 if divergence has occurred and a 0 is there is none.

Therefore the screener code for it would be: (Assuming you call your indicator "MACD Divergence")

indicator1 = CALL "MACD Divergence"
c1 = (indicator1 = 1.0)


SCREENER[c1] ((close/DClose(1)-1)*100 AS "% Chg yesterday")

On looking into this I noticed that ProRealTime already have a indicator called MACD divergence. (SEE below)

I'm not 100% sure how MACD works etc but I think this indicator may be more suited to your needs. You need to look into exactly how it works and what settings you want to use with it but it returns either,1,0 or -1. I would assume that 1 is a buy signal (positive divergence), -1 is a sell signal(negative divergence) and a 0 is do nothing. Take a look and let me know how you get on. If you need more help let me know.

Attachments:
MACD.jpg
MACD.jpg [ 24.75 KiB | Viewed 17230 times ]

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/