15minoffame 131 posts msg #100137 - Ignore 15minoffame |
4/6/2011 12:50:30 AM
Does anyone here know if it's possible to write a filter that tells you the monthly return for this month, last month, etc. Right now I'm using this filter, but the only problem is it's a rolling return filter. I would love it if it tells me the returns so far for the month of March, the returns for Feb, Jan, etc.
TIA if anyone can help me.
set{b1, close - close 20 days ago}
set{m1, b1 / close 20 days ago}
set{1mthgain, m1 *100}
set{c1, close 20 days ago- close 40 days ago}
set{n1, c1 / close 40 days ago}
set{2mthgain, n1 *100}
set{d1, close 40 days ago- close 60 days ago}
set{o1, d1 / close 60 days ago}
set{3mthgain, o1 *100}
|
djones000buck 206 posts msg #103261 - Ignore djones000buck |
11/8/2011 2:37:23 PM
If you are trying to analyze a long term trade, defining a variable as your buy price is an option, just a basic example below. You would have to add the additional time periods (minus 20 days per period) or just graph profit from your purchase price as shown. If your holding hundreds of stocks it might be a PITA, but for a handful of stocks works ok...
|