10.4 4H RSI2 with arrows

Post Reply
User avatar
boldtrader
Trader
Posts: 158
Joined: Fri Jun 29, 2012 10:05 pm
Location: Somewhere in the Northeast Kingdom.

10.4 4H RSI2 with arrows

Post by boldtrader »

Hopefully someone can assist,

I have been looking for 10.4 4H RSI2 and /or the MTF TMA Slope RSI Visual (original files added below), with arrows on chart on 80/20 crossover and with popup message alerts on crossover of the same 80/20 levels on any or all of selected time periods.

Does anyone know if they have had these features added for manual trading?

I have tried to add arrows to the MTF TMA Slope RSI Visual but am getting an "invalid index buffer number in iCustom function" in the experts tab. The code compiles ok.. but still getting the error, and no arrows. Could one of the more experienced coders here look at this for me please? Something tells me I am still missing something, or the layout is completely wrong (which is probably the case - LOL).

Thanks for assistance.
You do not have the required permissions to view the files attached to this post.
"Make Your 20, Bank Your Money... WFY II"
My Mission: Help families grow income, protect assets, erase debt, and gain financial independence.[/b]
garyfritz

Re: 10.4 4H RSI2 with arrows

Post by garyfritz »

iCustom parameters are iCustom(symbol, timeframe, indiName, <<indi parameters>>, mode, shift).

You did that just fine, passing all the parameters in the iCustom call -- but you just have "i" after the params. That's your "shift" parameter. You forgot the "mode" parameter, which specifies which buffer value gets returned by the iCustom() call. The only valid "mode" values are 0-7, so you used lots of invalid values.

Then you look for that returned value to be 110, and make up-arrow / down-arrow decisions from that. What is 110 and why would the MTF indicator return that in any of its buffers? (And on a more fussy level, au and ad are doubles. Doubles usually don't represent decimal values **exactly**, which is what == tests. That's why Steve uses the CloseEnough() function, which checks to see if two values are Really Close to each other.)

Furthermore, as far as I can see, you calculate au and ad with exactly identical iCustom() calls. Which means au and ad always have the same value, and thus if iCustom() returns 110, you'll plot up AND down arrows.

BTW you're always looping through the last 250 (BarsToCount) bars on a chart, which is not a real good idea. It's better to only update the bars that need it. Look in the original MTF indicator (inside start(), right after the "int i;" line) to see how to do that.
dudest
Trader
Posts: 1847
Joined: Tue May 08, 2012 2:37 pm

Re: 10.4 4H RSI2 with arrows

Post by dudest »

Thanks Gary, your reply has helped me too (with another problem I's trying to solve)

Cheers!
Post Reply

Return to “Coders Hangout”