Jump to content

Does 'repainting' invalidate graphical backtesting?

Recommended Posts


By 'graphical backtesting' I mean using the long/short position tool on TradingView.com.




Repainting can be a big problem while working out a trading strategy.
If you set up some indicators and look at the chart history it can be quite decieving, what may appear in the historical chart to be a great indicator that seems to create good signals on your chart when the lines cross, can actually turn out to be nowhere near as good in live trading because the historical chart only shows that indicator in a frozen moment in time, at the end of each price bar formation.
In practice you may find the indicator lines cross and uncross several times during each bar formation, rendering that indicator close to useless due to constant false signals that dont show on the historical chart.
This is one of the failings of the usual methods of time frame chart trading with indicators.


Link to comment

Can you see what 'strategy' I'm using by looking at that chart?  My backtesting suggests a 50% win rate, which is profitable with a 1:1.5 reward-to-risk. 

It's less than 50% successful with 1:2 on the indices, but makes more money.  Forex 'seems' to whipsaw more than the indices.  But ... need to test 100 times etc.

Link to comment
14 minutes ago, dmedin said:

Repainting can be a big problem while working out a trading strategy.

Depends what you mean by 'repainting' indicators. Most indicators repaint the current bar until bar close because the calculations change when the input data changes, once the bar has closed there is no more incoming data and the indicator is fixed. Most broker supplied indicators work like this but where indicators are written and uploaded by a community they may not.

Some indicators are designed to recalculate the previous n number of bars with each new bar close such as a 'centered' triangular moving average, this gives a smoothed curved fit. Or some indicators may 'backpaint' such as many examples of Zig Zag which delays printing a signal 3 - 5 bars then when confirmed backpaints the signal. Finally some indicators will rearrange signals for a better fit once subsequent bars have been printed, these are favoured by scam indy sellers who can show a perfect fit picture but in reality the indy performance is mixed.

  • Like 1
Link to comment

So basically it's not an issue.  What's really an issue is me jumping into trades before the MACD makes its crossing.  Getting a 'jump start' is, in my experience, less profitable than simply waiting for the confirmation.  :)

ProRealTime does not have graphical backtesting as far as I can see.  I could program this system partially but ultimately I think it has to be discretionary.  So you could program some of the parameters as follows, and set the system to alert you when the conditions are met, then you would review the trade and decide whether to enter and where to put your stop based on candle patterns etc.

Buy conditions:

  • Price < 200 EMA 

  • MACD crossed below signal line from above 0 

  • Bearish candle (e.g. bearish engulfing where current close is > than previous candle close and current open is >= previous candle open)

  • PSAR is above price (sell)

Sell conditions are the opposite.

I suppose if you wanted to fully automate it you could simply place the stop a couple of points below/above the PSAR and set TP to 1.5x the distance of the stop.

There are other buy conditions and variations such as:

* Buy when MACD rises above signal while both lines are above 0 on a bullish candle making a higher high with a stop just under the previous bullish candle

* Opposite for selling


And all sorts of other variations and optimizations are possible.  Slope of the 200 EMA?


Edited by dmedin
Link to comment

I'm SFB today and copied and pasted the wrong bit.

It should be:

SELL conditions:

  • Price < 200 EMA 

  • MACD crossed below signal line from above 0 

  • Bearish candle (e.g. bearish engulfing where current close is < than previous candle close and current open is <= previous candle open)

  • PSAR is above price (sell)

BUY conditions are the opposite.

Edited by dmedin
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • General Statistics

    • Total Topics
    • Total Posts
    • Total Members
    • Most Online
      10/06/21 10:53

    Newest Member
    Joined 05/02/23 04:54
  • Posts

    • HI,  Please if any IG supporting staff can answer the questions below? 1. in the upcoming AMC/APE vote on 14 March 2023, can shareholder that hold AMC and APE at IG able to make a vote? I also have AMC and APE at IBKR and they did send out a notification to inform me that I can do proxy vote. Will IG do the same? 2. the upcoming vote is to determine APE covert back to AMC then do reverse spilt. Last year after APE issued, IG staff told me that they have to move APE to share dealing account from my ISA account as ISA is not eligible to hold APE (which is completely unbelivable, my APE at AJ Bell and HL are still sitting in ISA account). Anyway, if the conversion and reverse spilt is going to happen, will IG move my APE back to ISA account for the corporate action? Many Thanks
    • The epidemic in recent years has produced profound changes in people's lifestyles, and many of their activities have started to be developed in the virtual world, which plays an important role in promoting the development of the universe of meta. Games, as an important part of the universe of meta, will be the first industry to gain the benefits , but the following conditions are still indispensable for blockchain games to achieve better development.   - Wallets and Exchanges. Through the use of wallets, game users can truly take control of the assets in the game, and exchanges provide a trading platform and liquidity for these game assets NFT, helping users trade and revitalize their game assets. Wallets are a key application for depositing blockchain assets. Currently, wallets such as Metamask are not enough to support the extensive adoption of block games, and wallets will further advance community drive the popularity of blockchain games.  - Game playability. The biggest difference between blockchain games and traditional games is that gamers are also investors. Many blockchain games have gone out of course, treating all users as investors only and forgetting that the essence of making games is to develop high-quality games that users are interested in paying for. If most people play a game just to make money, and no one is ready to pay for it, it becomes a side-scam. The revenue of the participants of the side scam comes from the money of the people who come later, and if there are not enough people who come later, they will not be able to cash in the revenue, leading to the breakdown.  - Speed and performance. A high level of concurrency is the characteristic of game applications, so Wax, Coinan Chain and Polygon, which are public chains with a high level of concurrency and low fees, have attracted a large number of game developers. In the future, with the maturity of technologies such as Ethernet Layer 2 and slice scaling, as well as the maturity of other gaming public chain technologies compatible with EVM, blockchain games will have a better development and operation environment.  - Cross-chain and interaction. Cross-chain and interaction of game assets will be a direction of future development of metaverse games, and blockchain should be connected and accessible like the Internet. The maturity of cross-chain technology in the future will promote the cross-chain transfer of game assets and NFT, and improve the interaction experience of the system                                                                                     The game should maintain the operation of the project by relying on the payment of some users or selling profitable products, just like the new blockchain game Fairy Cat in 2023, which developed diverse gameplay for players and increased the playability of the game, thus got the recognition of many players. Blockchain games need to work hard on game experience and playability. Token economics is essentially just a kind of interest structure , and even good token economics cannot replace the development, operation and profitability of the project itself. It is believed that with the maturity of the above conditions, more and more game developers and investors will enter this industry and together promote the production of some blockchain games with beautiful graphics, first-class experience and high playability.
    • Hello, Is any interest paid on "available" cash (not "margin") in a spread betting account? For example, if I held £10k in an account and had no open positions. The reason for asking is that I understand that proceeds from short sales in a CFD will receive interest (benchmark-2.5%), so was wondering if that applied to all cash, and couldn't find an answer on the web site.   Thanks.
  • Create New...