var test(var *Highs, int Period)
{
int count;
var recent_max_H = 0;
for(count = 1; count < Period; count++)
{
if (Highs[count] > recent_max_H) recent_max_H = Highs[count];
}
printf("nrecent_max_H:%f", recent_max_H);
return 1;
}
function run()
{
set(PLOTNOW|PARAMETERS);
StartDate = 20180705;
EndDate = 20180705;
BarPeriod = 60;
LookBack = 3;
// create series of highs, closes, lows
vars Highs = series(priceHigh());
int Period_Bar = 50;
if (test(Highs, Period_Bar) == 1)
{
enterLong();
}
}