Hi :)
my goal is to be able to go through a list of stocks and use the ichimoku strategy combined with SMA200/50 golden cross.
Right now I have a list of 2 stocks, FB and FSLR. but the stock plots do not look right. It seems like its the same closing price on both plots.
I wonder if its because that Im using the wrong method to get the closing price: Close= bar.Close
Im using an idea here from backtest-rookies. I have modified it to a day and 20 minute consolidator.
what am I doing wrong? Any help or ideas would be great :) thanks in advance
Martin etellerandet
I think I found the answer
https://github.com/QuantConnect/Lean/blob/master/Algorithm.Python/MultipleSymbolConsolidationAlgorithm.py
Martin etellerandet
ok I figured it out. in "def onDay" did a loop for each symbol. that was not a good idea. Since the consolidated bars are already lined up to make a sort of loop, each bar for each symbol comes after each other. So i simply needed to ask for the closing price of each bar. and plot that. solved :)
Biggleswurth
Biggleswurth
Biggleswurth
Biggleswurth
From: QuantConnect Team <
forum+10966.65539223e9c0b623dc4838d050a557c0@quantconnect.com>
Date: Sat, Mar 20, 2021 at 6:56 AM
Subject: Trade Option base on equity singnal - New Discussion
To:
[image: QuantConnect]
[image: profile pic]
Juventus created a new discussion:
* Trade Option base on equity singnal *
Hi,
I would like to know how do I trade option base on equity singnal
When the backtest trying to execute the line self.Buy(self.contract,1), it
has an error that option quote is not available.
I am not sure if I am doing it in a correct way, my understanding is that I
need to wait for the callback when option quote bar arrives before I can
place an order on that option, may I know how should I proceed?
[image: Shared backtest result]
Open Discussion
Unsubscribe | Email Preferences | Join Us
Biggleswurth
Biggleswurth
Biggleswurth
Biggleswurth
From: QuantConnect Team <
forum+10969.83292f542514d8f29e0963926347fdec@quantconnect.com>
Date: Sun, Mar 21, 2021 at 12:31 PM
Subject: Total unrealized profit for forex? - New Discussion
To:
[image: QuantConnect]
[image: profile pic]
Joshua Hughes created a new discussion:
* Total unrealized profit for forex? *
trying to do a max drawdown per trade of 2 %
Runtime Error: AttributeError : 'Forex' object has no attribute
'TotalUnrealizedProfit'
at OnData
if self.Securities["AUDNZD"].TotalUnrealizedProfit ===
at Python.Runtime.PyObject.Invoke (Python.Runtime.PyTuple args in
main.py:line 46
AttributeError : 'Forex' object has no attribute 'TotalUnrealizedProfit'
if self.Portfolio.Invested: if
self.Securities["AUDNZD"].TotalUnrealizedProfit
trying to set a max drawdown per trade of 2 % total capital
Open Discussion
Unsubscribe
Martin etellerandet
I dont get it. Anyhow. I solved the problem it can be seen in my previus post. have a nice day
Martin etellerandet
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.
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!