StockFetcher Forums · Filter Exchange · A simple PSAR based position sizing utility<< >>Post Follow-up
graftonian
1,089 posts
msg #155412
Ignore graftonian
1/23/2021 11:18:39 AM

This code can be run stand alone or pasted to the bottem of your fillter.
Graf
Fetcher[
/* PSAR based position sizing */
/* enter your account size and % max loss (as a decimal), below */
close > .25
draw Parabolic SAR(0.02,0.2)
set{AcctVal, 10000} /*Your stash here */
set{MaxLoss, AcctVal * .02} /* Your choice */
set{LossPerShare, close - Parabolic SAR(0.02,0.2)}
set{SharesToBuy1, MaxLoss / LossPerShare}
set{PositionSize, round(SharesToBuy1)}
add column separator
add column PositionSize
PositionSize > -1
set{EquityReqd, PositionSize * close}
add column EquityReqd
set{entry, close}
draw price line at entry
set{Bailout, Parabolic SAR(0.02,0.2)}
draw price line at bailout
do not draw PositionSize
]




StockFetcher Forums · Filter Exchange · A simple PSAR based position sizing utility<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.