How to get the Super Signal indicator data in the EA ? - page 2

 
RDBS #: Thanks a lot Mr.Fernando Carreiro for your valuable help guidance. As per your instuctions I attaching a sample EA file also here now. Please check it and correct me to get the required buffer details. In tester visual mode all details are coming. Only  in the .csv file I am not getting.

Thanks and Regards.

In your SAMPLE_EA you are ...

  • ... still using a local variable for the Indicator handle. I stated this in my previous post, but you did not correct it.
    int min_rates_total, ATRPeriod, SS;
    
    int OnInit() {
       ATRPeriod=5;
       min_rates_total=int(MathMax(dist+1,ATRPeriod));
       SS = iCustom(_Symbol,_Period,"SUPER SIGNALS",24,INDICATOR_DATA);
       if( SS == INVALID_HANDLE ) return INIT_FAILED;
       return INIT_SUCCEEDED;
    };
  • ... still obtaining the handle for the indicator just before the CopyBuffer. I stated this in previous posts, but you still did not correct it.
       // int SS = iCustom(_Symbol,_Period,"SUPER SIGNALS",24,INDICATOR_DATA);
       
       ArraySetAsSeries(SellBuffer,true);
       ArraySetAsSeries(BuyBuffer,true);
       
       CopyBuffer(SS,0,0,3,SellBuffer);
       CopyBuffer(SS,1,0,3,BuyBuffer);

  • You are using functions reserved only for Indicators in your EA. Remove them. (e.g. SetIndexBuffer, PlotIndexSetInteger,  PlotIndexSetDouble, etc.)
  • You are reading the buffer values for the current and previous bars, but there is most probably no signals in those locations at the time that the program runs.
 
Fernando Carreiro #:

In your SAMPLE_EA you are ...

  • ... still using a local variable for the Indicator handle. I stated this in my previous post, but you did not correct it.
  • ... still obtaining the handle for the indicator just before the CopyBuffer. I stated this in previous posts, but you still did not correct it.

  • You are using functions reserved only for Indicators in your EA. Remove them. (e.g. SetIndexBuffer, PlotIndexSetInteger,  PlotIndexSetDouble, etc.)
  • You are reading the buffer values for the current and previous bars, but there is most probably no signals in those locations at the time that the program runs.

Hello Mr.Fernando C....  Thanks for your reply and guidance. I have tried all your suggested guide lines. Still I am not getting the values in my .csv file.

I have tested many indicators with iCustom function and got the buffer values perfectly in the .csv files so far. Only in this case I am unable to get it.

In your last suggestion you have stated this:

  • "You are reading the buffer values for the current and previous bars, but there is most probably no signals in those locations at the time that the program runs."
  • If I don't get the signal for the current and bar 1 (previous par) how can I utilise it for my EA ?
  • Thanks and regards for all your replies and efforts so far.......
Reason: