Click here to Login





                                                   Counter for number of occurences..

  0

0
allan nathan
2014-08-19 12:55:28


Hi,
How would I go about coding a "counter" which sums up the number of occurences over X days?

Would it be a combination of the IFFstring and Sum function? Would it be SumIf??

i am trying to set up a signal if there are 4 or more distribution days for the last 20 days with increasing volume.Its a short sell signal.

distribution day is a day where the close is down .2% or more from previuos close on increasing volume


dist=volume>ref(volume,1)and perf(close,1) <-0.20;

baddist=Sumif(dist>4,20);

thanks,

Allan



Seeker
2014-08-19 20:37:18

  0

baddist = sum(dist, 20) >= 4;


allan nathan
2014-08-20 07:26:30

  0

thanks seeker!



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 Increases for each Month/Year
Number of Listed Companies for several Stock Exchanges
Base or Counter Currency
Extensive Fundamental Data for U.S. Stocks
Time-series Sum for the first Minutes/Hours of a Trading Day

How-to Lessons
How to display the number of stocks per day for different RSI gro...
How to adjust a stock for splits
How to display the number of notes per stock
How to get fundamental data for U.S. Stocks
How to optimize the number of positions in a trading system

Related Forum Threads
Preventing re-entery for certain number of bars
In-Sample and Out-Of-Sample Dates for Optimization
Custom Multi-Dimensional Fitness Formula (CMDFF) for Optimizer
Chart for 1m bars over a custom time range
An example for Excel COM automation - Further joint development?

Blog Posts
Create custom metrics for the statistical data analysis tool
How to Backtest Your Trading System for Each Industry
How to Select the Best Market Indicator for your Trading System
How to get buy and sell orders for a portfolio based on a trading...
Step by step on how to get free realtime/delayed data for stocks,...









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.