HI Everyone,
I think something is wrong with the format of my numbers but i'm not sure. I tried changing my values to a decimal and that still doesn't work. My algorithm is supposed to by and sell when the difference between the AUDUSD and NZDUSD spreads goes negative.
2019-10-20 18:00:00 :spreadDelta less than 0: -0.000140000000000029You will see that it enters one trade because of the above condition(delta less than 0)
Now it is supposed to liquidate when the delta is greater than 2.0.
2019-10-20 19:00:00 :Is spreadDelta greater than 2?: 7.999999999996898e-052019-10-20 19:00:00 :Is spreadDelta greater than 2?: FalseThe delta is greater than 2 here, it is 7. Why doesn't my parameter recognize this?
Apollos Hill
Hi Everyone i fixed this almost 5min after i posted it, i went on stackoverflow and realized "human error" my numbers were false...the computer is always smarter than the human. Except for autotext :) Very dumb.
Laurent Crouzet
"7.999999999996898e-05"
>> That is much lower than 2!
Apollos Hill
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!