WealthScript Programming Guide > "Access a specific bar" example 2
Author: mikesblack
Creation Date: 2/24/2016 2:32 PM
profile picture

mikesblack

#1
Hi,
Using the example "How to: Access a specific bar example 2 " Screen for 14 day RSI Period RSI values under 30:
CODE:
Please log in to see this code.

Compiles, but does not show any activity in the Alerts or trades pages after running the startagy. What am I missing? Here is my code from this example. Also using all data Raw Profit on AAPL
CODE:
Please log in to see this code.
profile picture

Eugene

#2
This example is crafted to work on the last bar only. Notice Bars.Count - 1. Consequently it won't generate any trades - only Alerts. Check out AAPL's 14-period RSI value at the 02/23/2016 bar.
profile picture

mikesblack

#3
I don't see anything for 2/23/2016.
profile picture

Eugene

#4
Just give it some thought and give it another attentive look.

1. Read the script you're trying to run:
CODE:
Please log in to see this code.

2. Then plot 14-period RSI and notice its value.

Hope this is clear.
profile picture

mikesblack

#5
Yes. It never reached that value for the last bar. I made the RSI value <60. This produced a signal.

I've been going through the programming guide item by item to help me learn. I think this is helpful.
profile picture

Eugene

#6
Great, just a little more attention goes a long way.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).