Replies: 1 comment 1 reply
-
This matches and runs (position closing and re-buying) on every bar of your example. If you're looking for a cross-over, see |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am starting to test backtesting.py, coming form freqtrade world. I am a bit confused about the results I get. Probably because I am wrong on some concepts. The whole domain is quite new for me (trading, algo trading, etc).
My first test is on a crypto. The strategy is really stupid, just to test the behaviour. Buying if price under a value and selling if above a greater value. I would expect it makes positive return when the conditions are good, but it's not the case. Here are the data.
OHLCV in a csv file:
Strategy:
Stats:
The plot:
As the market start very low and cross several times my limits, as I buy lower than I sell, how is it possible to get a negative return at the end, in the favourable chosen conditions?
I would expect to have blank trade periods, when it's sold above 255, until a buy occurs again under 248. Here the train lines are continuous from beginning to end.
I think too I am misunderstanding the short/long meanings, regarding buying/selling actions. This is weird for me:
If someone has a good definition... I got some other information elsewhere in the trading web sphere, but it makes me more confused! I don't know if the concepts here are related to general trading/backtesting functioning, or related to specific backtesting.py internals/constrains.
I am surprised by the count of trades (1033) in one day. I guess these are only my buy/sell signals. I would like to know how many effective buys/sells occurred in that day.
Well, if someone has a bit of time to explain, welcome!
Thanks a lot.
Beta Was this translation helpful? Give feedback.
All reactions