Attachments forums

List of attachments posted on this forum.


All files on forums: 163426

Re: Coding Help

mrtools, Mon Jun 05, 2023 7:08 am

kkfx wrote: Mon Jun 05, 2023 6:15 am Here is modified EA based on new G channel indicator.
the MTF call for G channel is working ok along with pyramid function.
Image
Maybe this will help in the future

From Mladen Rakic:

If you are looking for the eternal trend buffer, then use buffer 5 (even though it is not visible in the data window,, it is accessible - you have to experiment a bit with the buffers access when you do that, but it is easy once when you do that). Here is the code for that :

Code: Select all

//------------------------------------------------------------------
//
//------------------------------------------------------------------
#property indicator_chart_window
#property indicator_buffers 0
extern int digitsToDisplay = 5;
extern int valuesToDisplay = 10;
//------------------------------------------------------------------
//
//------------------------------------------------------------------
int init()  { return(0); }
int start() 
{ 
   string result="";
   for (int i = 0; i<valuesToDisplay; i++) result = result + DoubleToStr(iCustom(NULL,0,"ema adaptive ema mtf + alerts 2_2",3,i),digitsToDisplay)+"\n";
                                   Comment(result);
   return(0); 
}
And here is the result (all 1s and -1s as it can be seen)


That code snippet can serve you as a guide to access various values from various buffers (even when they are not visible on charts) - changes to indicators are not necessary to make just because some buffer is not visible - since any buffer used in calculation IS ACCESSIBLE
All files in topic