Difference between Pivots

amitrandive

Well-Known Member
#1
Dear All

I want an exploration which calculates the difference between the Daily and Weekly and Pivots and the Daily and Monthly Pivots.

This exploration should write the difference between as an example say Daily R1 and Weekly R1 in points or percentages.

Thanks
Amit
 

casoni

Well-Known Member
#3
Hello ,
check this

r1= is your daily r1;
w1= is your weekly r1


diffpoints = r1-w1;

X = round(r1 - w1);
Chg =Prec((X/w1)*100,1);


filter=diffpoints and chg
AddColumn(diffpoints,"diff",1.2);
AddColumn(chg,"chg",1);


Hope this helps.
thank you
 

casoni

Well-Known Member
#5
Hello ,
it is complete code..

r1= is your daily r1;// put your daily r1 condition
w1= is your weekly r1;// put your weekly r1 condition


diffpoints = r1-w1;// this will show you diff in points

X = round(r1 - w1);
Chg =Prec((X/w1)*100,1); // his will show you diff in %


filter=diffpoints and chg ;// explore
AddColumn(diffpoints,"diff",1.2);
AddColumn(chg,"chg",1);

still you want.....ready to use then post your whole code
thank you
 

amitrandive

Well-Known Member
#7
Casoni

I have developed the following code, I want the exploration to return only those values which are lesser than 0.5%.

TimeFrameSet(inDaily);

PP = Ref( ((H + L + C)/3),-1) ;

Range = Ref((H-L),-1) ;

R1 = PP + PP-Ref(L,-1) ;

S1 = PP - (Ref(H,-1)-PP);
DC= Ref(C,-1);

TimeFrameRestore();
TimeFrameSet(inWeekly);

PW = Ref( ((H + L + C)/3),-1) ;

Range = Ref((H-L),-1) ;

RW1 = PW + PW-Ref(L,-1) ;

SW1 = PW - (Ref(H,-1)-PW);
PC= Ref (C,-1);

TimeFrameRestore();


r1=TimeFrameExpand(PP,inDaily,expandFirst);
w1=TimeFrameExpand(PP,inWeekly,expandFirst);

diffpoints = r1-w1;// This will show you diff in points

X = round(r1 - w1);
Chg =Prec((X/w1)*100,1); // This will show you diff in %


Filter=diffpoints AND chg ;// explore
AddColumn(diffpoints,"diff",1.2);
AddColumn(chg,"chg",1);

Thanks
Amit
 

columbus

Well-Known Member
#8
It would be so nice of you ,if you include the OUTPUT of the program here.
It will help a lot ,those ,who are well versed with AMIBROKER.
This go well for any such CODES.Thank you.
 

casoni

Well-Known Member
#9
Casoni

I have developed the following code, I want the exploration to return only those values which are lesser than 0.5%.

TimeFrameSet(inDaily);

PP = Ref( ((H + L + C)/3),-1) ;

Range = Ref((H-L),-1) ;

R1 = PP + PP-Ref(L,-1) ;

S1 = PP - (Ref(H,-1)-PP);
DC= Ref(C,-1);

TimeFrameRestore();
TimeFrameSet(inWeekly);

PW = Ref( ((H + L + C)/3),-1) ;

Range = Ref((H-L),-1) ;

RW1 = PW + PW-Ref(L,-1) ;

SW1 = PW - (Ref(H,-1)-PW);
PC= Ref (C,-1);

TimeFrameRestore();


r1=TimeFrameExpand(PP,inDaily,expandFirst);
w1=TimeFrameExpand(PP,inWeekly,expandFirst);

diffpoints = r1-w1;// This will show you diff in points

X = round(r1 - w1);
Chg =Prec((X/w1)*100,1); // This will show you diff in %


Filter=diffpoints AND chg ;// explore
AddColumn(diffpoints,"diff",1.2);
AddColumn(chg,"chg",1);

Thanks
Amit
there is small error ..check code marked in red..
it should be
w1=TimeFrameExpand(Pw,inWeekly,expandFirst);// corrected
 

amitrandive

Well-Known Member
#10
Casoni

Thanks for pointing out the error.

Please guide me how to limit the results only to shoe with the differences of 0.5%.

My strategy is as below ( I found on a net article in Forex trading)

1) find the distance between (a) pivot and wkly resistance (b) pivot and wkly support

2) trade the direction of the one with the larger distance

e.g. pivot is 180pips apart from weekly resistance. pivot is 230pips apart from weekly support. GO SHORT

*the difference between (a) and (b) should be significant enough. at least 30 pips difference.*
 
Last edited:

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?