How to get buffer from unkown parameter

 

i have tried all i can just to grab data from this custom indicator, its "<Deleted>" and i want its value to be use in my EA by getting the buffer, but i dont know wether its because of the parameter or other cause, i have successfully get buffer from other custom indicator, but this one is not..

i dont even know what data i get from the buffer, so i just print it in hope i will figure it out once i see it but all i get is 0 from all buffer ;(

//STRAT-1 Signal Generator
int getS1Signal(string symbol, ENUM_TIMEFRAMES period){
   int ctr = 0;
   double ind1 = 0, ind2 = 0, succRate = 0, signal = 0;
   #define BUFFER_BUY 8
   #define BUFFER_SELL 9
   #define BUFFER_RATE 24
   #define BUFFER_SIGNAL 19
   ind1 = iCustom(symbol, period, header0, " ", inS1Factor, inS1Bars, BUFFER_BUY, 1);
   ind2 = iCustom(symbol, period, header0, " ", inS1Factor, inS1Bars, BUFFER_SELL, 1);
   succRate = iCustom(symbol, period, header0, " ", inS1Factor, inS1Bars, BUFFER_RATE, 1);
   signal = iCustom(symbol, period, header0, " ", inS1Factor, inS1Bars, BUFFER_SIGNAL, 1);
   Print("pipfinite "+symbol+" | buy: "+ind1+", sell: "+ind2+", rate: "+succRate+", dump: "+signal);
   return -1; // returns no signal
}
 
  1. Why did you post your MT4 question in the Root / MT5 General section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

  2. Do you really expect an answer with the information you've provided? There are no mind readers here and our crystal balls are cracked. We have no idea what indicator you're using, which version, what parameters and their types. Do you really have an indicator with 24 different buffers?
              Detailed explanation of iCustom - MQL4 programming forum

  3. On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4

 
William Roeder:
  1. Why did you post your MT4 question in the Root / MT5 General section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.

  2. Do you really expect an answer with the information you've provided? There are no mind readers here and our crystal balls are cracked. We have no idea what indicator you're using, which version, what parameters and their types. Do you really have an indicator with 24 different buffers?
              Detailed explanation of iCustom - MQL4 programming forum

  3. On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4

sorry im a newbiee sir, noted.

 

BUFFER_RATE is 24, are you sure there are 24 buffers in your indi ?


i think you're retrieving bad buffer numbers


start with 0, 1, 2 , 3...

Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Indicators Lines
Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Indicators Lines
  • www.mql5.com
Some technical indicators have several buffers drawn in the chart. Numbering of indicator buffers starts with 0. When copying indicator values using the CopyBuffer() function into an array of the double type, for some indicators one may indicate the identifier of a copied buffer instead of its number.
 
Jean Francois Le Bas:

BUFFER_RATE is 24, are you sure there are 24 buffers in your indi ?


i think you're retrieving bad buffer numbers


start with 0, 1, 2 , 3...

well the developer says so in the indicator description in 'About' tab sir

 
Jean Francois Le Bas:

BUFFER_RATE is 24, are you sure there are 24 buffers in your indi ?


i think you're retrieving bad buffer numbers


start with 0, 1, 2 , 3...

i hv successfully retrieving the BUFFER_RATE but the rest are still 0, or is it possible the value is zero because there are currently no signal, and only gives value when there is any signal sir?

 
Lutfy Alamsyah:

i hv successfully retrieving the BUFFER_RATE but the rest are still 0, or is it possible the value is zero because there are currently no signal, and only gives value when there is any signal sir?

well of course it will give a value only when there is a change in your curves or arrows


you need to pass your indicator through the strategy tester and observe when something changes what it changes in the data

 
Jean Francois Le Bas:

well of course it will give a value only when there is a change in your curves or arrows


you need to pass your indicator through the strategy tester and observe when something changes what it changes in the data

ahh so thats why, up till now im just guessing and realizing just how dumb i am, thank you sir ;)