DVMayfied 8 posts msg #136131 - Ignore DVMayfied |
5/30/2017 6:30:42 PM
Hi all! I'm trying to figure out the best way to setup simple triggers or alerts for very simple criteria. My first approach is to just create a filter, but I'm not sure if that is the right approach. I want to setup an alert that will tell me when SPY is over its MA(200) AND Vix is 5% above its MA(10)
I did this but it isn't working as anticipated...
apply to symlist (SPY, VIX)
SPY Close above MA(200)
and VIX Close More than 5 percent Above MA(10)
|
Kevin_in_GA 4,599 posts msg #136132 - Ignore Kevin_in_GA |
5/30/2017 7:12:30 PM
The ^VIX is an index, so it cannot be called in a filter as you are trying here:
apply to symlist (SPY, VIX)
SPY Close above MA(200)
and VIX Close More than 5 percent Above MA(10)
This should work
At the moment would not return SPY since the ^VIX is not more than 5% above its MA(10). you can see this by looking at the column called "trigger" - if there is a "1" in it then that criterion is being met, otherwise it returns a "0".
Hope this helps.
|
DVMayfied 8 posts msg #136133 - Ignore DVMayfied |
5/30/2017 8:01:53 PM
This helps a lot! Thank you very much
|
Kevin_in_GA 4,599 posts msg #136134 - Ignore Kevin_in_GA |
5/30/2017 9:39:16 PM
Glad to help. Note that some of the code I used here may not be familiar to you just yet. I suggest reading the user manual, and looking at code written by folks here in the forums. There are a lot of good sources here that can help you get better at SF syntax and coding.
|