Back

How do you create a Moving Avergage Channel in C#

All I'm new to C# sharp; however, picking up on it quickly. I was wondering how I would go about programming a moving average channel with an 8 day moving average "Low" and 10 day simple moving average "High"?

Update Backtest








Hi kc8yty, welcome to QC :-)

Just a quick question, what do you mean by Low and High? Do you mean an 8 day simple moving average of each day's Lowest price, along with a 10 day simple moving average of each day's Highest price?

1

Hi Stephen, Thanks for the reply! It is a 8 day simple moving average "low" of price within a 30 minute time frame & a 10 day simple moving average "high" of price within a 30 minute time frame.


0

Sorry kc8yty, I think I'm not understanding something fundamental here. Consider me a slow person :-P

So let's say we create two indicators:

One named "Low", which is an SMA of rolling window 8 days.
One named "High", which is an SMA of rolling window 10 days.

What are your plans for populating these two indicators? It's the mention of 30 minute time frames that are confusing me.

1

Hi Stephen,

Here is an example. Sorry, I have not been on in awhile.
Hi Stephen,

Here is an example. Sorry, I have not been on in awhile.


http://fxtradingbox.com/wp-content/uploads/2015/03/Jake-berstein.png






0

Hi kc8yty,

From the graph in this link (http://fxtradingbox.com/wp-content/uploads/2015/03/Jake-berstein.png), it seems plotting a MACD fast & slow line to the price plotting of an equity.

Is this something you want to archive?

1

Hi Casper,

I'm trying figure out how I can program my entry signal.

The system is based on a 30 minute chart

Rules:

Long
Do not trade for the first 30 minutes of the opening bell
2 consecutive price bars must be completely above the 10 day simple moving average "high" (Second bar most close higher than the first)

Filter: 28 day Momentum indicator must be above or has crossed the 28 day simple moving average.


In my past post: I was trying figure out how to program 10 day moving average high and 8 day moving average low on a 30 minute c

0

Any help would be appreciated! I've been extremely busy the last couple weeks and have not had chance to work on my project.

Thank you for the help!

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed