I'm still learning Quant Connect, coming from a Metatrader background. One of the things that are a bit irritating is the fact that I cannot visually validate if my coded logic is working as intended. Meaning there is no proper chart to visually inspect buys/sells + indicators to see if it's doing what it's supposed to do.
That being said, I'm manually looking at timestamps with a chart on TradingView to see if the logic is working as intended.
An extremely simple strategy to test this is to buy at close of upper Donchian channel and sell and close of bottom Donchian channel.
What I'm finding is the values don't align with what I see on the chart. For example, this buy and sell trade:
+2021-04-30 12:00:00BTCUSD Buy Market Fill: $57,109.00 USD 1.73591166Filled
+2021-05-10 16:00:00BTCUSDSell Market Fill: $55,770.00 USD -1.73591166Filled Liquidated
For starters, the timestamp does not reflect the correct entry point however the price is correct. TradingView shows 16h00 whereas it shows as 12h00 on the order details. Then, the closing trade is way incorrect. It should have closed on 2021/05/04 00:00. However for some reason it was sold on the 10th, 6 days later.
So my question… is my logic incorrect (am I not understanding something properly) and what is the easiest way to visually validate if logic is working or not ?
Varad Kabade
Hi Franky,
The difference occurs due to the difference in the time zone. The orders in the orders table are time stamped in est(4 hrs before). Your algorithm logic is correct.
Best,
Varad Kabade
Franky
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!