Use of Comment for expert advisor

 

Hi,

My indicator use (ShowAlerts) Comment, and the comment shows a buy or sell signal. How do i translate these buy or sell comment, signal, into an expert advisor?

Ed

 
EdwinJ:

Hi,

My indicator use (ShowAlerts) Comment, and the comment shows a buy or sell signal. How do i translate these buy or sell comment, signal, into an expert advisor?

Ed

Put your signal into two buffer that you will create in your indicator,

 Then, Inside this loop put your indicator signal :

 if(   condition buy )
    {
     Alert("signal_buy" );
     buffer_signal_buy[i] = Close[i];
    } 
                     

Don't forget to put SetIndexEmptyValue( x, 0.0);  for the indicator

and then use an iCustom inside your EA to call your buffers = your signals

 
Thanks
 
EdwinJ: My indicator use (ShowAlerts) Comment, and the comment shows a buy or sell signal. How do i translate these buy or sell comment, signal, into an expert advisor?
  1. Not a good idea to use Comment. Any additional indicator/script/EA could override it. It could be stale on a new bar.
  2. So if you have the source code, ffoorr's suggestion is best.
  3. But you can just read the comment. ChartGetStringCHART_COMMENT