Click here to Login





                                                   Exclude symbols after crossing value x

  0

0
Dennis Schutten
2016-08-13 09:01:17


Hi,

How do I exclude symbols from being bought if the close value has even went below value x in past history?

For example:

Buy a stock at value 100, value drops and goes below value 90. Position is closed.

Stock moves to 120 but is never bought again because stockvalue dropped below 90 in past history so its excluded.

Is this possible in a syntax?

Regards,
Dennis



QuantShare
2016-08-15 07:07:30

  0

You can calculate the lowest close value over a number of bars:

a = llv(close, 250);
buy = [yourrule] and a > 90;



Dennis Schutten
2016-08-15 07:53:00

  0

I already knew that, but the lookback period has to be a increasing one. Currentbar-firstbar....


QuantShare
2016-08-16 05:08:28

  0

Easiest way to get lowest over all history is:

a = llv(close, 1000000)



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
Number of Ticker Symbols
US Stock symbols - CUSIP
LSE Symbols
Frankfurt Stock Exchange Symbols
15 ETF Symbols of Major Asset Groups (ETF AA-15)

How-to Lessons
How to quickly select stocks based on the last value of a databas...
How to create a screen
How to quickly add a ticker symbol
How to create a composite index/indicator
How to add custom position-based metrics to your trading system

Related Forum Threads
Excluding symbols
Script to remove Symbols from an Index
Regarding trading after market hours
Futures data - overwrites stock symbols, issues with point value
saving value in trading machine simulator

Blog Posts
Different Ticker Symbols for Each Data Source
How to Create a List of Ticker Symbols
Same chart, different symbols
More about QuantShare Programming Language
Fundamental Screen based on Stock price, ROI and Market capitaliz...









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.