New User code
Am new to Stock Charts. I have written a few strategies with Ami Broker, but would like to know how to write the following code
1- yesterday's low to be 3% below the yesterdays close, so a sell off
2-RSI(2) to have stayed below RSI(10) for 3 consecutive days
Also, is there a way to scan for Historical Volatility. So i would like the HV100 to be greater than 30 over the past year.
Thanks
1- yesterday's low to be 3% below the yesterdays close, so a sell off
2-RSI(2) to have stayed below RSI(10) for 3 consecutive days
Also, is there a way to scan for Historical Volatility. So i would like the HV100 to be greater than 30 over the past year.
Thanks
0
Comments
-
Try this for the first part.
[group is sp500]
and [1 day ago low < 1 day ago close * 0.97]
and [max(3, rsi(2)) < min(3,rsi(10))]
I don't see a Historical Volatility indicator on the Technical Indicator drop down list on the advanced scan page. Maybe someone knows a good substitute?0 -
Markd
I wrote it in Ami Broker as
HV= StDev(log(c/ref(c,-1)),100)*(252^.5)*100;
And then write hv > 30 for example
One more question. If i wanted the code for the RSI breaking above 10 after being under it for 3 days, how do i write that.
Thanks for taking your time to answer these questions, not just mine, but all the others too. Appreciate it
Jay0 -
It appears the SC scan engine is not as sophisticated (but probably easier to learn for the non-programmer, I'm guessing).
To check for the crossover, just move the "under" condition back a day.
and [1 day ago max(3, rsi(2)) < 1 day ago min(3,rsi(10))]
and [rsi(2) x rsi(10)]
Thanks for the kind words. I learn from it, too. People have interesting ideas.0
Categories
- All Categories
- 2.4K StockCharts
- 397 SharpCharts
- 146 Other Charting Tools
- 69 Saved Charts and ChartLists
- 1.5K Scanning
- 74 Data Issues
- 177 Other StockCharts Questions
- 224 Technical Analysis
- 155 Using Technical Analysis
- 6 InterMarket and International
- 19 Market and Breadth Indicators
- 44 Market Analysis
- 109 Trading
- 109 Trading Strategies
- 162 S.C.A.N the StockCharts Answer Network forum
- 64 Using this StockCharts Answer Network forum
- 98 s.c.a.n. archives
- 7 Off-Topic
- 7 The Cogitation & Rumination Emporium
- Forum Test Area
