# Amibroker ""PLEASE correct me and help me!!

#### wajo111

##### New Member
Hello hardworking people,

I have read your forums , went though multiple sites and cannot find the simple answer i'm looking for,

if you would please be kind and offer your assistance it would be most honourable.

All I am trying to do is manipulate the program to show me a gapup with a desired percentage. For example a gapup with a % of less than 3%.

Could you please correct my code. I cannot for the life of me get it to work

Gapu= GapUp() ;
Gapd = GapDown();

PREVIOUSDAYCLOSE= Ref (C,-1);

FIRSTDAYBAR = Day() != Ref(Day(), -1);
firstbarOfDayOpen = ValueWhen( FIRSTDAYBAR, Open);

percent =((PREVIOUSDAYCLOSE - FIRSTDAYBAR)/PREVIOUSDAYCLOSE)*100;

Buy = Gapu AND percent < 2 ;/// A GapUp of less than 2%
Sell =0;

#### Logik

##### Active Member
Re: Amibroker &quot;&quot;PLEASE correct me and help me!!

Sorry, accidentally posted this. Was checking tapaltk.

Sent from my Redmi Note 4 using Tapatalk

#### Chandiran

##### New Member
give a try

PHP:
``````SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = Date()+ EncodeColor(colorWhite)+"OPEN:"+ Open+" ,"+"HIGH:"+High+" ,"+"LOW:"+Low+" , "+"CLOSE:"+Close );
Plot(Close,"",colorDefault,styleCandle);

DayC = TimeFrameGetPrice("C", inDaily, -1);	  //previous day close
Newday = Day() != Ref( Day(), -1 ) ;//newday
newdayopen = ValueWhen( Newday,O, 1 ) ; //newdayopen
percent =((dayc - newdayopen)/dayc)*100;//percentage calc

Sell=0;
Short=0;
Cover=0;``````

#### wajo111

##### New Member
Hi,
thanks for your reply, I really appreciate it. Would you know if its possible to find the change in cents rather than percent. I looked through ami site but don't think this is possible. Would you know?

warm regards,