[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 136

 

Good evening!

If you can do it, please advise how. What should I write in the code of the EA, so that when you run in the tester of the EA, the indicator used will be drawn on the chart in the course of testing, and not appear only after running through the history?

 
programmatically - difficult, it is easier to pre-fill the tester chart with all the indicators used (with the required settings), and save the template as tester.tpl, this template will be loaded automatically.
 
orb:

Good evening!

If you can do it, please advise how. What should I write in the code of the EA, so that when you run in the tester of the EA, the indicator used will be drawn on the chart in the course of testing, and not appear only after running through the history?


You place it on the chart of the symbol at the appropriate TF and the input parameters, as well as in the tested EA, then save this template with the same name as that of the EA. That is all. When you run this owl in the Strategy Tester, all of the indicators used will be displayed during visualization testing throughout the test.
 
2FAQ ,Roman. Thank you!
 
FAQ:
programmatically - difficult, easier to pre-load all used indicators on the tester chart (with the required settings), and save the template as tester.tpl, this template will be loaded automatically.

Thank you! I did it every time!
 

Hello !

Problem with signal calculation:

if RSI is above overbought level or below oversold level more than N bars, signal = "0", in all other cases signal = "1".

Maybe an error with the cycle - the counter does not work, i.e. signal "0" occurs just after the levels...

#property indicator_chart_window
#property indicator_buffers 1

extern int Per = 6; // Период RSI
extern int RSI_Price = 6; // цена :0-Close; 1-Open; 2-High; 3-Low; 4-"high+low)/2"; 5-"(H+L+C)/3"; 6-"(H+L+C+C)/4".
extern int up = 70; // Уровень перекупленности индикатора RSI
extern int dn = 30; // Уровень перепроданности индикатора RSI
extern int N = 6; // Число баров выше уровня перекупленности/ниже уровня перепроданности, больше которого сигнал = "0"

double Buffer[];

int init()
{ SetIndexStyle(0,DRAW_NONE); SetIndexBuffer(0,Buffer); SetIndexLabel(0,"Sign");
return(0);
}

int start()
{ int counted_bars=IndicatorCounted();
if (Bars <= Per+11) return(0); if (counted_bars > 0) counted_bars--; int limit = Bars-counted_bars;

for (int i=0; i<limit; i++)
{ double a = iRSI( NULL,0,Per,RSI_Price,i);
double b = iRSI( NULL,0,Per,RSI_Price,i+1);

double Sign=1;

int count = 0;
if ((a>up) || (a<dn) || (b>up && a<up) || (b<dn && a>dn))
{ for (int j=0; j<=N; j++)
{ double R=iRSI(NULL,0,Per,RSI_Price,j);
if((R>up)||(R<dn)) count++;
}
if (count>N) Sign=0;
}
Buffer[i] = Sign;
}
return(0);
}
Files:
 
Good afternoon, could you tell me which indicator can be used that shows volume but not tick volume?
 
first_may:
Good afternoon, could you tell me which indicator can be used that shows volume but not tick volume?
how can it show something that is not in the terminal?
 
first_may:
Good afternoon, could you please tell me which indicator can be used that shows volume but not tick volume?


Afternoon. See this article.

At the top of the screen - menu bar - TA tab.

Reason: