Hi

I want to draw jacob support on an intraday graph
The formula is based on previous day daily data and is
High2 = Average + High1 - Low1
High1 = 2*Average - Low
Average = (High + Low + Close)/3
Low1 = 2*Average - High
Low2 = Average + Low1 - High1

I Wrote this formula  (sorry but I am a rookie in formula writing)

_SECTION_BEGIN("Supports");

TimeFrameSet (inDaily);
Average= Ref((High + Low + Close)/3,-1);
High1= Ref((2*Average)-Low,-1);
Low1= Ref((2*Average)-High,-1);
High2= Ref((Average + High1 - Low1),-1);
Low2= Ref(Average+Low1-High1,-1);
Plot(LastValue(Average), "Average", colorBlue, styleThick );
Plot(LastValue(High2),"High2",colorRed,styleThick);
Plot (LastValue(High1),"High1",colorRed,styleLine);
Plot(LastValue(Low1),"Low2",colorDarkGreen,styleThick);
Plot (LastValue(Low2),"Low1",colorDarkGreen,styleLine);

TimeFrameRestore ();


_SECTION_END();

The number were I based my calculation  (ER2 feb 21)
High 720.40
Low 693.20
Close 694.20

In excel my results are
H2 729.80
H1 712.00
Av 702.60
L1 684.80
L2 675.40


With my amibroker formula , results are
H2 723.66
H1 716.73
Av 703.83
L1 691.93
L2 687.86

I don't understand why the numbers are differents

Any help appreciate

Thank's

MG

Reply via email to