Hello All coders.Nice to meet you.
I have some difficulty in create Divergence object in chart.
My idea is to create divergence line by two conditions
1 -if Highest Bar in last 100 Bars < High Bar in last 5 bars ,Draw trendline in chart by two anchor points (last highest bar and last 5 high bar)
2 -if Highest RSI value in last 100 bar > Rsi value last 5 bars ,Draw trendline in chart.
just want to estimate possible divergence not exactly but generally.
My main purpose is
To detect reduce trend momentum .
If trend momentum reduce .I decide for orders in EA.
Here my codes are
for (int i=Bars;i>=100;i--)
int highestlast100bars= High[iHighest(NULL, 0, MODE_HIGH,i,1)];
double lastRSIHigh= iRSI(NULL,0,14,PRICE_CLOSE,i);
double currentRSI = iRSI(NULL,0,14,PRICE_CLOSE,1);
if ( lastRSIHigh > currentRSI )
Please suggest some modification or show me if you have better tools to check decrease trend momentum condition after strong trend.
Opening a new topic, then waiting not even 90 minutes and then posting
is a sure way to make sure that nobody will want to help you!
Actually, it's the opposite. Most here are looking for slaves to code for free and not willing to put in the effort to learn or pay someone.
You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem. No free help 2017.04.21
Please enable the necessary setting in your browser, otherwise you will not be able to log in.