TradingView
rafaelcmrj
11 apr 2018 18:42

Modified ANN Strategy - Pine 3.0 and not repainting 

Euro Fx/U.S. DollarFXCM

Beskrivning

That's a modified version of the ANN Strategy developed by sirolf2009. In this version, the timeframe was changed from 1D to 6H; it allows the strategy to identify reversion patterns faster than the original script. I also migrated the script to the version 3.0 of the Pine Language, adding the feature to NOT repaint (I'm testing if it's really not repainting yet).

** THIS SCRIPT IS STILL IN TEST **
Kommentarer
rafaelcmrj
That's the script: pastebin.com/u7cYtPD7
DowBits
@rafaelcmrj, Do you need to match today and yesteray variables with the granularity selected?
talvasconcelos
@rafaelcmrj, could you walk me through the ANN process? I built a trading bot and would like to use tensorflow to create an AI model like this. What's the training data (just the diff from past candles?) and where do those weights come from?

Thanks,
Tiago
everget
This is scam. It uses daily data on intraday timeframe. It looks into the "future" through security(tickerid, 'D', ohlc4). Excellent solution. Good luck, guys! Happy losses!
pabloses
@everget, Is it still a scam with version=3 ? Thanks
everget
@pabloses,
1) Look, the original network was trained on the BTC data and this guy applied it to EURUSD. This is absolutely invalid practice.
2) "the timeframe was changed from 1D to 6H" - it uses data from the higher time again. Of course 15min strategy will be profitable when we look in the future)
pabloses
@everget, Thank You, I was thinking according to this video youtube.com/watch?v=dOjUn6TvYok, that version=3 would be enough to fix "look into the future" issue. But looking at the code, it seems that it uses paramter " barmerge.lookahead_on" in security function:

yesterday=security(tickerid, '720', ohlc4[1], barmerge.gaps_off, barmerge.lookahead_on) and this would be most likely the problem.

Documentation says :

barmerge.lookahead_on
Merge strategy for the requested data position. Requested barset is merged with current barset in the order of sorting bars by their opening time. This merge strategy can lead to undesirable effect of getting data from "future" on calculation on history. This is unacceptable in backtesting strategies, but can be useful in indicators.
mehowbrains
May you explain how the indicator works please? :)
Smikel
working? need code
EmanuelArano
and the code?
Mer