Discussions
»
Product and Service Development
»
Formula Assistance
»
What formula needed to detect peaks/troughs and divergence?
Rank: Newbie
Groups: Registered, Registered Users Joined: 9/27/2009(UTC) Posts: 2
|
Could you tell me what formula I need to create an indicator that detects a peak or trough has formed on a stochastic 14. I would like the formula to put a dot where each peak or trough occurs. The detector can call a trough when the stochastic has not gone below it after 3 bars of data perhaps. Also, I would like the formula to color each subsequent bar green where the chart price is lower lowering since the last stochastic trough while the stochastic has not gone down below its last trough. In other words a normal bullish divergence situation. The bars can stop being highlighted green when another stochastic trough is detected. In my picture at this link: http://pd2010pd.netfirms.com I used the Paint program to paint what I thought the indicator would look like once finished, it is not an MS indicator even thought it might look like it is. The purple dots simply highlight all stochastic peaks and troughs, and the green colored bars are bars where the close price is lower lowering since the stochastic trough point when the stochastic itself did not make a lower low. Once again simple bullish divergence. Thanks for any help you could suggest, even partial solutions. The ability to change the stochastic from a 14 to another value easily just by altering the code is necessary. Thanks Al
|
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 11/7/2005(UTC) Posts: 602
|
Try using the Cross() function of the stochastic function (solid line) and it's moving average (dotted line).
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 9/27/2009(UTC) Posts: 2
|
Well I'll try, this formula stuff is difficult.
Thanks for at least replying.
Al
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
What formula needed to detect peaks/troughs and divergence?
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.