Guys please HELP MEEEEE! I am stuck!

 


Hi guys, i'm starting now an 

Writing code to indicators, and experts so far.

Coding and indicator i was able to use, different types of indicators... to search a better point to help my  decisions..and everything is normal, but (lol), and i say BUT, trying to translate this to an expert, oh gosh! I am facing this trouble. When i execute, the expert, it opens a indicator's window in every tick.

Can anyone help me? I am a bit newbie on this! 

This indicator it looks like and windows from RSI, MACD, on his stylish! 

Just to make clear... i am using CopyBuffer(iCustom(_Symbol, _Period, "Name of the indicator"), 0,0,0, array-to-it), and my indicator is working just fine! The only difference is that on indicator as i learn, the third zero on iCustom... we use rates_total and the copybuffer and iCustom or using a handler they are located inside of OnCalculate, and in the expert i use arraysetasseries to reach the point to add...this indicator.

And i am tired... almost the entire friday and saturday on it!

Please guys! Help me!

Damn.... 

 

Forum on trading, automated trading systems and testing trading strategies

Getting garbage values from iStochastic function

Alain Verleyen, 2018.03.23 14:12

That's what is happening when nothing is checked.

  • Is your handle valid ?
  • Is CopyBuffer() returning an error ? How much data were copied ?

The handle is (iStochastic in OnInit), the CopyBuffer in OnTick (or OnTimer).

Please read the documentation !


 
Alain Verleyen:

Thanks for the reply Alain!

Well the handle is place inside OnTick, but for sure i try to relocate it to OnInit, i will try to check the errors. 

My doubt is just, if i do something that i can't see, by a lack of experience.

For the record, the indicator is not a iStochastic, (even if it's look alike) is a Indicator made by a Brazilian Trader. 

i will post the code in a simple way... because i am so stuck that, i thinking in clear a lots of code to be able to see it.

Again... still thank you for the reply!

Reason: