Lanclos 5 posts msg #127456 - Ignore Lanclos |
3/1/2016 2:09:36 PM
Can someone help me answer how do I give a point to a variable?
Example) If SAR changes direction in the past 10 days assign variable to 1
/* Parabolic SAR cross last 10 days */
set ParSarVar = 1 if Parabolic SAR(0.02,0.2) crossed below close within last 10 days
Thanks
|
SAFeTRADE 644 posts msg #127459 - Ignore SAFeTRADE |
3/1/2016 8:32:29 PM
Try this, it may be to your liking.
|
Kevin_in_GA 4,599 posts msg #127466 - Ignore Kevin_in_GA |
3/2/2016 9:51:10 AM
Not exactly. I would code it this way:
This way should give you a signal for any time within the last 10 days that the cross below occurred. I get 23 results where your code gave all 30 stocks - note that CSCO, JNJ, KO, MRK, PFE, TRW, and XOM all had crossovers more than 10 days ago but still show up in your screen.
|