Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenfus/tradingview
Some pinescript programs.
https://github.com/kenfus/tradingview
Last synced: 3 months ago
JSON representation
Some pinescript programs.
- Host: GitHub
- URL: https://github.com/kenfus/tradingview
- Owner: kenfus
- Created: 2019-05-07T23:19:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-23T14:08:26.000Z (over 4 years ago)
- Last Synced: 2024-08-01T19:54:08.005Z (6 months ago)
- Language: Python
- Size: 228 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - kenfus/tradingview - Some pinescript programs. (Python)
README
![Strategy Result](Screenshot_20200523_154048.png)
# Random Strategy
I wanted to know how good a random strategy is in forex-trading. Why? I don't know.
# Approach
I used a 3 level-take profit and a 1 level-stoploss.
The stoploss was set at 1.2*atr and the takeprofit at 0.8, 1.2 and 1.6 times the atr. The length of a trade was also random.
Because Pinescript has no implemented random number generation, I created one based on
[Lehmer random number generator](https://en.wikipedia.org/wiki/Lehmer_random_number_generator).The strategy can be seen here: [Random-Strategy-with-3-TP-levels-and-SL](https://www.tradingview.com/script/lfZvb4hY-Random-Strategy-with-3-TP-levels-and-SL-Kenfus/)
# Results
The results were as expected. I had, with some tuning of the parameters for the Lehmer Random Number generator, amazing results (a 70% winrate on the 15-minute chart).
However, those were of course heavily overfitted so I'm showing here a "random" one.# Todo
It would be fun to completely overfit to the past data and get incredible results.