Click here to Login





                                                   Finding horizontal Support/Resistence lines using AutoSR

  0

0
Kiran
2016-03-13 18:40:45


I'm using AutoSR and Searchfor to find the last horizontal Support and Resistence lines (i.e. with slope<10degrees) and plot them (code below)

1) The code doesnt plot any horizontal Support/Res lines - is my Searchfor syntax correct?

2)Alternately, can horizontal S/R be expressed using _aboveline/_belowline? - pl advise as i'm not clear on how _belowline can be used to describe resistence.
res = searchfor _belowline(close, close) and (_slope(close, ___ )*180/3.14 <10;


////Code for (1)...
period = 50;
res = searchfor AutoSR(1, 0, period) and absolute(SlopeAutoSR(1, 1, period)*180/3.14)<10 ;
sup = searchfor AutoSR(1, 0, period) and absolute(SlopeAutoSR(1, 1, period)*180/3.14)<10 ;
resLag = barssince(res);
supLag = barssince(sup);

period = 50; // The period used to calculate the trendlines
resLine = AutoSR(1, resLag, period); // Resistance level for each trading bar
supLine = AutoSR(0, supLag, period); // Support level for each trading bar

PlotCandleStick("Quotes", colorBrown|255|colorViolet|255|0, StyleSymbolVdash);
Plot(volume, "Volume", colorLime|55|colorLime|64|0, ChartBar, StyleOwnScale);

plot(resLine, "Resistance", colorBlue, ChartLine, StyleNoScale);
plot(supLine, "Support", colorRed, ChartLine, StyleNoScale);



QuantShare
2016-03-14 04:01:31

  0

Kiran,

The "Searchfor" function is no longer supported. You should avoid using it for now.



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Parallel Resistance and Support Lines
Slope of Support and Resistance Lines
Murrey Math Lines Indicator
Support and resistance lines based on N-Minutes high/low of a tra...
Horizontal Line - Changes by Value and Percentage

How-to Lessons
How to draw an horizontal segment line using QS language
How to plot a stock using different periods in the same chart
How to calculate the average of a time series using the money man...
How to debug a trading system using the money management tool
How to get stocks for a particular index using the global script

Related Forum Threads
Backtest using AutoSR function
AutoSR enhancements ..
Horizontal line on indicator
AutoSR from current bar
Can I update the sector and industry information in the stock dat...

Blog Posts
Backtesting chart patterns using the auto support and resistance ...
Detect chart patterns using the auto support/resistance indicator
Technical Analysis Using Multiple Timeframes - Second Part
Real Time Alerts: Support and Resistance Lines Breakout
How to Scan for Parallel Resistance and Support Lines









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.