enzoampil / fastquant

fastquant — Backtest and optimize your ML trading strategies with only 3 lines of code!
MIT License
1.54k stars 239 forks source link

Not able to import strategy class from another python file #406

Closed YASHGUPTA2611 closed 2 years ago

YASHGUPTA2611 commented 2 years ago

Capture1

First i have made a strategy class in a separate python file and imported some of the libraries which will be use.

Capture2

but when i try to import my strategy class, it is giving me some error.

mikeejazmines commented 2 years ago

This may mean that in your strategy you are passing more than 2 elements when it is only expecting 2. (As stated in the ValueError)

I'd recommend looking at the indicators you are calling and what you are passing to them. This may be caused by whats under the init function of the class you made and not fastquant itself.

mikeejazmines commented 2 years ago

Has this been addressed, may we close the issue?

YASHGUPTA2611 commented 2 years ago

Yes, thankyou the issue has been resolved.