Strategy Code Based on:
- Price Divergence Detector V2 by RicardoSantos
- UCS_Murrey's Math Oscillator by Ucsgears
- Strategy Code Example by JayRogers
- - http://www.babypips.com/school/high-school/trading-divergences
*** USE AT YOUR OWN RISK ***
Sorry my English is bad.
I'm newbie at TV, but I would like to ask questions in 2 topics.
I did backtest of this strategy. (FXCM price, USDMXN 15 min chart, standard parameters).
In the list of trades many trading was written that OPEN and CLOSE happened at the same time (minute), but different price. I think the system opened the trade at candle's open (for example 19:00), and later but within the same candle the system closed the trade, but this happened not at 19:00, but also for example 19:08.
Why there were not wrote in the list of trades the closing time like 19:08, instead of 19:00?
Is it happened because your system (fault), or it is general problem (fault) in Tradingview?
In the list of trades many was opened at candle's OPEN, and was closed at candle's HIGH/LOW (which were better).
How the system knows the HIGH/LOW?
Is it repaint?
Is it useable as automated strategy in live trading?
Topic 2: The TV back tests are performed by the server at TV end, so it knows all the details of the candles used. The back testing results are performed at the close of the signal candle and numbers are interpolated from the candle shape and decides from there where/whether the close/stop is going to happen. When strategy is running in real time the calculations are performed on a tick basis so different results will be observed. I have put some code in the script to try and prevent repaint but I'm not sure it has worked. I don't recommend using auto trading too many variables need to be considered to optimize trade selection (like where are the support and resistance zones, time of day etc). Also automation features are not yet available in TV.
I hope that helps...