Weet iemand hoe je dit indior-plot in de toekomst ��n maat kunt maken?
#property indior_chart_window
#propertyindior_buffers 2
#propertyindior_color1 Blauw
#propertyindior_color2 Rood
//---- invoerparameters
externe int Lengte=10;
extern int ATRperiode=5;
extern dubbel Kv=2,5;
//---- binnenbuffers
dubbele UpBuffer1[];
dubbele DnBuffer1[];
dubbele huid[];
dubbele smax[];
dubbele trend[];
// ------------------------------------------------------------ -------------------
//| Aangepaste interne initialisatiefunctie |
// ------------------------------------------------------------ -------------------
int begin()
{
tekenreeks korte_naam;
//---- binnenlijn
SetIndexShift(0,UpBuffer1);
SetIndexShift(1,DnBuffer1);
SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(1,DRAW_LINE);
IndiorBuffers(5);
SetIndexBuffer(0,UpBuffer1);
SetIndexBuffer(1,DnBuffer1);
SetIndexBuffer(2,smin);
SetIndexBuffer(3,smax);
SetIndexBuffer(4,trend);
//---- naam voor DataWindow en indior subwindow label
short_name=ATRStops( Lengte );
IndiorShortName(korte_naam);
SetIndexLabel(0,Omhoog);
SetIndexLabel(1,Dn);
//----
SetIndexDrawBegin(0,Lengte);
SetIndexDrawBegin(1,Lengte);
//----
terug(0);
}
// ------------------------------------------------------------ -------------------
//| ATRStops_v1 |
// ------------------------------------------------------------ -------------------
int begin()
{
int shift,limit, counted_bars=IndiorCounted();
if (counted_bars gt; 0) limit=Bars-counted_bars;
if ( counted_bars lt; 0 ) return(0);
if (counted_bars ==0) limiet=Bars-Lengte-1;
for(shift=limit;shiftgt;=0;shift--)
{
smin[verschuiving] = -100000; smax[verschuiving] = 100000;
voor (int i = Lengte-1;igt;=0;i--)
{
smin[shift] = MathMax( smin[shift], High[shift i] - Kv*iATR(NULL,0,ATRperiod,shift i));
smax[shift] = MathMin( smax[shift], Low[shift i] Kv*iATR(NULL,0,ATRperiod,shift i));
}
trend[verschuiving]=trend[verschuiving 1];
if (Sluiten[shift] gt; smax[shift 1] ) trend[shift] = 1;
if (Sluiten[shift] lt; smin[shift 1] ) trend[shift] = -1;
als ( trend[verschuiving] gt;0 )
{
if( smin[shift]lt;smin[shift 1] ) smin[shift]=smin[shift 1];
UpBuffer1[shift]=smin[shift];
DnBuffer1[verschuiving] = EMPTY_VALUE;
}
als ( trend[verschuiving] lt;0 )
{
if( smax[shift]gt;smax[shift 1] ) smax[shift]=smax[shift 1];
UpBuffer1[shift]=EMPTY_VALUE;
DnBuffer1[verschuiving] = smax[verschuiving];
}
}
terug(0);
}