WebmasterForums.NET - Webmaster Forums & Directory
 

Go Back   WebmasterForums.NET - Webmaster Forums & Directory > Design and Development > Site Programming and Coding
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Site Programming and Coding Have a problem with some code on your site? Ask our other members for advice and help.

Reply
 
Thread Tools Display Modes
Old 07-25-2006, 08:08 PM   #1
Darioush
Member
 
Darioush's Avatar
 
Join Date: Jul 2006
Location: Sunny California
Posts: 53
Darioush is on a distinguished road
Default Help needed in coding using PP+

I am a new user for Metastock/power pivots plus. I need help

in programming PP+.

I would like to create my own trading system using PP+.

At any point of time, I would like to define Reward/Risk ratio
something like (Upper resistance - Close price)/(Close price -
Lower support) for Long trades

'Upper resistance' is a nearest pivot upside which can be

minor/intermediate/Major/Primary and must be greather than

Close price

Similarly 'Lower support' is a nearest pivot downside which

can be minor/intermediate/Major/Primary and must be less than

Close price

Now my problem is that when I try function for Upper

resistance

ExtFml("PowerPivots.NthPivotPrice",1,0,1)
1. I am getting price some times less than close price and

2. some times that minor pivot upside is grater than
Intermediate pivot upside
i.e. ExtFml("PowerPivots.NthPivotPrice",2,0,1) is becoming less than
ExtFml("PowerPivots.NthPivotPrice",1,0,1)

I wanted closest pivot(R/I/M/P) upside which is greater than Close

Finally I wrote an indicator for the same as follows

{myPP+ - Target long}

CV:=C;
HV:=Highest(C);
P1:=If(ExtFml("PowerPivots.NthPivotPrice",4,0,1)>C V,
ExtFml("PowerPivots.NthPivotPrice",4,0,1),
HV);
M1:=If(ExtFml("PowerPivots.NthPivotPrice",3,0,1)>C V,
ExtFml("PowerPivots.NthPivotPrice",3,0,1),
HV);
I1:=If(ExtFml("PowerPivots.NthPivotPrice",2,0,1)>C V,
ExtFml("PowerPivots.NthPivotPrice",2,0,1),
HV);
R1:=If(ExtFml("PowerPivots.NthPivotPrice",1,0,1)>C V,
ExtFml("PowerPivots.NthPivotPrice",1,0,1),
HV);
D1:=IF(P1>M1, M1, P1);
D2:=IF(D1>I1, I1, D1);
D3:=IF(D2>R1, R1, D2);
D4:=IF(D3=HV,-1,D3);
D4;

It does not apper to be working. Also when put in exploration
the exploration is very slow.

Is there any better way to write this indicator?


Thanks in advance.
Sankar
__________________
Napa Valley wine, wineries, on-line wine sales, lodging, vacations, golf, current events http://www.napavalley.com
Darioush is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 11:27 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
WebmasterForums.NET - Webmaster Forums & Directory