SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : TradeStation - Why No thread for this mega product

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Michael Watkins who wrote (126)1/6/2002 10:01:08 PM
From: MechanicalMethod  Read Replies (1) of 147
 
I'm looking for a way to access point and figure signals
from a standard bar chart. Basically I just need to know
if the current direction is in an up or down column. If
price remains between $20 and 100 I'm ok but I haven't
worked out the part outside that range yet. Perhaps a
factor can be applied to the intPortion function? The
following code plots a line that mimics the last p+f value
but needs something to allow for less than $20 and greater
than $100 prices. All suggestions for how to compensate
for this problem will be appreciated.

{145 P+F v0.01}
var: pfDir(1), pfPrice(0), box(0);

if c>20 then box=1;
if c>100 then box=2;
if c<20 then box=.5;
if c<5 then box=.25;

if pfDir>0 and H>=pfPrice+box then pfPrice=pfPrice+intPortion((H-pfPrice)/box)*box;
if pfDir<0 and L<=pfPrice-box then pfPrice=pfPrice-intPortion((pfPrice-L)/box)*box;

if pfPrice=pfPrice[1] and pfDir>0 and L<=pfPrice-3*box then begin
pfDir= -1;
pfPrice=pfPrice-intPortion((pfPrice-L)/box)*box;
end;
if pfPrice=pfPrice[1] and pfDir<0 and H>=pfPrice+3*box then begin
pfDir=1;
pfPrice=pfPrice+intPortion((H-pfPrice)/box)*box;
end;

plot1(pfPrice,"pfPrice");
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext