Click here to Login





                                                   How to find divergences ?

  0

0
Oleg
2017-03-18 09:09:32


How to program finding divergences between price and an indicator reading?
Please advise

Thanks



QuantShare
2017-03-20 05:45:16

  0

There are several ways to do this. For example, you can compare the N-bar rate of return.

a = sma(30);
div = perf(a, 10) > 5 and perf(close, 10) < -5;



Oleg
2017-03-20 19:20:35

  0

I see . Thanks. Out of curiosity what are other ways to check for divergences.
Also is there any way to localize a peak on an indicator such as MACD ?

Please advise



QuantShare
2017-03-21 04:34:28

  0

Yes there are other ways. You can for example calculate the slope of each indicator (LinearReg_Slope) and compare it.

To localize a peak you need to access future bars.
However, if you want to detect highest high values of an indicator, please use the "hhv" function.

a = hhv(close, 20); // Highest close over the last 20-bars



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
    To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










    QuantShare

    Trading Items
    How far are the close prices from the support line
    Minimum Variance Optimization with Solver V1.1- AMM
    Trading Rules using Trend Indicators
    Scale-in Trading Strategy
    Predict financial and stock markets with textual analysis

    How-to Lessons
    How to download a trading item from the Sharing Server
    How to draw distances on a chart?
    How to dynamically update the settings of an indicator
    How to download new quotes when selecting a chart
    How to create a mobile database/account

    Related Forum Threads
    How do I find the close price for an entry matching a custom DB
    How to find historical ETF data
    how to draw Flag (Bullish) on chart?
    How to browse and search the blog?
    How can I view signals rejected by the simulator?

    Blog Posts
    How to create and backtest thousands of trading rules in less tha...
    How to Scan for Parallel Resistance and Support Lines
    Let me Show You How to Create Hundreds of Profitable Trading Syst...
    How to create a trading system, screen and composite using earnin...
    Fundamental analysis: How to track economic indicators in the For...









    QuantShare
    Product
    QuantShare
    Features
    Create an account
    Affiliate Program
    Support
    Contact Us
    Trading Forum
    How-to Lessons
    Manual
    Company
    About Us
    Privacy
    Terms of Use

    Copyright © 2025 QuantShare.com
    Social Media
    Follow us on Facebook
    Twitter Follow us on Twitter
    Google+
    Follow us on Google+
    RSS Trading Items



    Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.