How to identify a trend on Minute resolution for scalping?

Back

Hi folks,

Firstly i applogise if this is a silly question but i am very new to quantconnect and i can't quite seem to find what i'm looking for.

I have a XAUUSD strategy i'm looking to automate and roughly i need to do the following:

  • Identify on the 1 minute timeframe when a up/down trend has just closed past the previous high/low of the previous X number of candles.

Firstly i'm not too sure how many candles i should be looking back, when trading this manually the moves up and down in the market are very clear to see, even on the 1m timeframe. How would i be able to achieve something like this? Again sorry if this is a very simple question thats often asked. Thanks folks

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.


Hi Tom,

To achieve this, we can create a Maximum indicator and check if the current price is greater than the indicator's current value. See the attached backtest for reference.

Note that the attached example has a fixed lookback window. Going forward, try adjusting the lookback duration or consider multiple lookback durations.

Best,
Derek Melchin

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.


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...

To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!