⚠ WARNING: Never Trust TradingView's Strategy Tester!

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024

Комментарии • 288

  • @TradersLanding
    @TradersLanding 3 года назад +84

    This is an outstanding video. I added it to a playlist on my channel. I think every trader that uses the "backtester" NEEDS to see this video. I love the music you put in the background! Fantastic job.

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +5

      Thanks my friend! I appreciate the kind feedback. It's a real shame that the tester works this way, but it is what it is I guess. It's the price we need to pay for the awesome simplicity of the Pine language

    • @TradersLanding
      @TradersLanding 2 года назад +4

      @@TheArtOfTrading Indeed. I think your PineScripts are great! Let me know if you have some you want to highlight and turn into a system to test. It could be a neat collaboration.

    • @azadarashhamn
      @azadarashhamn 2 года назад +2

      Hey Trader's Landing, I don't wanna be a jerk, but lacking information about something doesn't mean that thing is not good. The whole approach has done by The Art of trading is wrong.

    • @TradersLanding
      @TradersLanding 2 года назад +1

      @@azadarashhamn Hey now. Thanks for sharing your opinion. Keep it coming.

    • @frankmartinez2987
      @frankmartinez2987 2 года назад +2

      @@azadarashhamn How so?

  • @ezrakoper
    @ezrakoper Год назад +31

    The strategy tester was improved since this video was published for the payed version enabling deep backtest that check internally smaller time frames inside the bar. It is not 100% accurate however much more accurate. It would be nice if you made same video now with the deep backtest enabled and report the new a acvuercy

  • @lavittoriasaranostrajk24
    @lavittoriasaranostrajk24 2 года назад +63

    I'm sorry, but unfortunately this is almost completely wrong. If you have a strategy with indicators and you want to test it, you set the data, so to close the position you need to set it to 'wait for the candle to close' and wait for the candle to close regularly. If this is not how you set your strategy, then you should not test it the way you do it. So there's nothing wrong with backtesting, I think your strategy is wrong.

    • @thefilmjerk901
      @thefilmjerk901 Год назад +13

      Came here to say this exact thing. I stopped about 4 min in. My strategy has coded in to stop out on a candle close below stop only. Bam. Fixed.

    • @Soundoverload
      @Soundoverload Год назад +1

      @@thefilmjerk901 sounds very risky

    • @thefilmjerk901
      @thefilmjerk901 Год назад +1

      @@Soundoverload how so?

    • @whatwhat9485
      @whatwhat9485 Год назад +4

      I dont think he came to these conclusion by fiddling with tester. I think he came to the conclusion when his strat tanked when the script showed profit.

    • @Alex-pf9yf
      @Alex-pf9yf Год назад +7

      This video is pretty old already. Have you ever considered that Pine Script has been through development as well since this video was posted. Wait for candle to close now actually a 'feature' in v5 which it wasn't a year ago on v4.

  • @TheArtOfTrading
    @TheArtOfTrading  2 года назад +13

    *IMPORTANT UPDATE:* TradingView have since added a new feature to the strategy tester that mitigates 99% of the dangers I explain in this video. Watch this recent update video for more info about the new "Bar Magnifier" feature: ruclips.net/video/5UzXzewiFKQ/видео.html

    • @trevorwilliams5415
      @trevorwilliams5415 Год назад +2

      Hi Matthew. Based on the point you make here in your comment, would it be wise to pull this video down. I am sure you would not want to spread a false message when the TV dev team have made significant improvements to the back-testing, if the bar magnifier is used correctly. I suspect that many people will watch this video and take it as current without reading the comments to find this one from you.

    • @wrapitup46
      @wrapitup46 7 месяцев назад +2

      You should pin this comment to the top, or delete this out-dated video.

  • @Dylan-xj5iz
    @Dylan-xj5iz Год назад

    Love how the music builds tension in the intro!

  • @tolun99
    @tolun99 Год назад +3

    One way to find possible problem trades is to code in the script where the entry-bars are large enough to stop you out. Then you can go in look at them manually. You'll get a feel pretty quickly for the % that was losing trades.

  • @VascoFernandes
    @VascoFernandes 2 года назад +5

    Hi @The Art of Trading
    I'm fairly new to pine script, and i'm trying to take advantage of learning already version 5. From what I've understood, strategy function is supposed to have a parameter to help for this, or am I totally wrong?:
    calc_on_every_tick (const bool) Additional intrabar strategy calculations. If the parameter is 'true', then the strategy will calculate on every tick in real-time, rather than on bars' closes. The parameter does not affect strategy calculation on historical data. The default value is 'false'.
    Do you currently make use of this? And still fails? Thanks for this awesome video, in any case.

  • @golias1979
    @golias1979 3 года назад +6

    Mate, if you work without STOP losses, the backtest works fine!

  • @benedikt48
    @benedikt48 Год назад

    Thank you very much for these valuable insights... Just made my first comprehensive testing-script during months of work. Now i know how to evaluate the results properly.

  • @arash2306
    @arash2306 2 года назад +29

    As you mentioned, there are several of ways to mitigate this risk. Using close for entry, using value loss, and stop. Of course smaller timeframe is indeed a better option to backtest in TV. After publishing your strategy, you can look at the drawdown column in the "List of Trade" tab in the Strategy Tester. If the drawdown is higher than your stop loss, then your backtest isn’t valid .

    • @knightnxk2906
      @knightnxk2906 Год назад

      I've noticed something strange.
      My scripts report higher max drawdown than there are inside the trades.
      the max on 2 scripts was 0.62% and 0.2%
      first script reported 4% drawdown, the other 0.39%
      Should I take that as I positive sign then?
      The only thing that bothers is that stop lose doesnt affect anything, yeah maybe some numbers change the number of net profit, but they dont do anything different inside the script and trade, if the piece of code was or was not included, would not matter for the outcome

  • @mehrdadjaliliyan774
    @mehrdadjaliliyan774 3 года назад +7

    Thanks for this notice. I have a question about that
    Is the forward testing trustable on Tradingview if the "On every tick" option is activated?
    And can trust the result of this test same as a real test on exchange?

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +1

      I believe forward-testing should work ok with Pine since that actually will consider intrabar price movement. Not sure what you mean as a real test on exchange, but the tester will not account for spread, slippage, lack of volume to execute your trades etc

  • @TA-MUSIIQUE
    @TA-MUSIIQUE Год назад +1

    7:18 "always manually backtest your strategies, there is no way to shortcut this process". "drawdown could be much higher, and percent profitable lower"

  • @Militaryjournal1985
    @Militaryjournal1985 2 года назад

    Outstanding job mate !!

  • @elliotpolanco159
    @elliotpolanco159 2 года назад

    really great pointing that issue out, beware

  • @rdtradecraft
    @rdtradecraft 3 года назад +9

    While I have often seen a strategy that tested profitably in backtesting, automated or manual, turn out not to be profitable in actual trading, I have never seen the opposite, a system that was not profitable in backtesting that turned out to be profitable in real trading.

    • @eleefant3873
      @eleefant3873 2 года назад

      ok...

    • @chaosu2448
      @chaosu2448 2 года назад

      i think part of the reason is that a system that was tested to be not profitable wont be put into real life trade in the first place...

  • @andresolbach
    @andresolbach 2 года назад +1

    I do think this is outdated. They have updated it as I see. If I use a indicator in the 15 minute chart on candle closure and the same candle where it enters hits the SL and TP, and in the 1 minute chart it hits first the SL, it also shows that the SL was hit, and not the TP

  • @tiwam
    @tiwam 3 года назад +8

    Thank you for the great video. I found this issue by myself when one of the strategy I made was too good to be true, but you explained it clearly that the system does not work tick by tick. But I still use it for testing my longer term stock trade strategy using weekly chart, typically winning position last longer than one year, something like that... Pine still can be used for this kind of trading. Of course I check transaction log one by one (but not all) for bug fixing.

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +4

      That's perfect, and exactly how I use the tester as well. If your script operates on candle closes and especially on higher timeframes then it's far less of a problem (although it will still be an issue on bars that hit your target + stop loss on the same bar)

  • @tonykonig2068
    @tonykonig2068 3 года назад +2

    You could backtest on the 1, 2 or 5 minute chart and it would be less likely to fail. However it may only go back a limited number of days.

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад

      Hey Tony! Yeah that's a great idea in theory but you're 100% right, if you want to test a 4HR or Daily strategy it's impossible as you'll only get a week or so of data which is nowhere even close to enough data to determine a strategy's historic profitability. Good thinking though, maybe one day this will be possible if TradingView increase the bar limit

  • @jonnyjazzz
    @jonnyjazzz Год назад +4

    On your comments about forward testing, traders should think of their strategies as an investment. Just as you (should) average into your investments, you should average into new strategies. Start with a small account size or allowance and increase it as you gain confidence. Keep a moving rating of profits, drawdown and consecutive losses to get an idea of how healthy your strategy is going forward.

  • @bluffrockstar
    @bluffrockstar Год назад +6

    You can specify the recalculation after order is filled, on every tick, or, on bar close

    • @freenrg888
      @freenrg888 Год назад

      That's interesting. Can you share some steps to achieve that?

  • @miladbgn
    @miladbgn 3 года назад +4

    Doesn't testing the strategy on the lower time frames like M1 solve this problem?
    Thanks for your priceless contents.

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +3

      It would definitely help. The problem with that though is that TradingView only allows a few thousand historical bars on your chart at once (depending on your TradingView membership plan), and so the 1-minute timeframe could only backtest a few days worth of data. Thanks for the kind feedback Milad! Good luck with your trading :)

  • @kuldeepssharetradingsystem8596
    @kuldeepssharetradingsystem8596 3 года назад +4

    I keep it simple.. I test the strategy, set parameters of charts according to the timeframe I trade. Even though the profits are lesser than system output, but @20 to 25 % lesser only.

  • @KT_KT_
    @KT_KT_ 2 года назад +9

    Does using 1 or 2 time frame lower than the trading timeframe helps in improving the accuracy? Thanks

  • @domingoalpajora3991
    @domingoalpajora3991 2 года назад

    Valid point but what your describing is whats called “ getting wicked out” as in price sharply drops due to whales and your SL hits. Just push back your SL back a bit. Works well tested by my AI trading programs with 3commas

  • @moregeekthanchictv
    @moregeekthanchictv 2 года назад +1

    Does the Bar Magnifier feature on the Pro+ version of the tester mitigate this problem?

  • @paulmarshall7794
    @paulmarshall7794 2 года назад +16

    Your summary is everything I have learnt in the last 10 years - trust nothing and find your own answers. Excellent video!

  • @CompilerZ
    @CompilerZ 3 года назад +2

    14:33
    This is what I said in your previous video , Thank you for deleting my comment !!! 🙈🙉🙊
    Thumb up 👍

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +3

      Hey Compiler! So sorry about that, but we definitely don't remove any comments from our videos - not sure what could've happened there. It's possible RUclips is hiding some comments, because we don't have any record of it. Sorry again! We appreciate your input, thank you :)

  • @jamisonmunn9215
    @jamisonmunn9215 2 года назад +1

    I have been messing with Pine Script for 3 months solid now and it has some major flaws. Make any strategy with one trade on a daily chart and most likely the tester won't even show you a Max Drawdown. I have made over 20 full fledged strategies and after awhile I was noticing the Max drawdowns aren't making sense. Every single one has been wrong so far and I don't know how they are even doing it anymore.

  • @rcamarda390
    @rcamarda390 Год назад +1

    TV is beta testing 'Deep Backtesting'. Is this new feature supposed to address the video conents?

  • @sergiofigueiredo1987
    @sergiofigueiredo1987 2 года назад +5

    I like the informed honesty and very grounded approach! This is one of the best ways to teach. People can "sense" when someone's BS is lurking but we still want to believe and ignore it, or when you are being helpful and sharing valuable information, for free, that you know to be the truest to the best extent of your personal experience! Thank you for that :) Super subscribed for eternity

  • @imperion8238
    @imperion8238 Год назад

    Thanks for the informative video

  • @sedz21eagle6
    @sedz21eagle6 Год назад

    amazing video, informative and helpful, thank you!!

  • @frankmartinez2987
    @frankmartinez2987 2 года назад +5

    Thanks for this video. Do you have a link to a template spreadsheet like the one you show? Also, what do you recommend as a source of quote data at whatever granularity One might want, 1m/5m/15m/1h/1d/etc.? Thanks again in advance.

  • @christiandavis8291
    @christiandavis8291 2 года назад

    Love this. Thank you.

  • @iankoch0007
    @iankoch0007 3 года назад +4

    Great job Mathew!
    As clearly demonstrated the 1H candle is not enough to determine if the trade was winning or not, because both the SL (Stop Loss) and TP (Take Profit) was hit.
    So the problem is if SL or TP was hit first?
    The TV backtester has no way of knowing except if going to a lower timeframe to handle the ambiguity. But the ambiguity can repeat on lower timeframes like 1m og 1s and can only be truly solved on tick level.
    I am not sure TV has Tick Data for every single instrument going many many years back. AFAIK you can buy 1s data but not tick data from TV, and should the strategy tester work differently depend on your TV payment plan?
    I think not. But I hope TV strategy testing team will include an option in the future to filter out ambigious trades like the one you have so nicely demonstrated.

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +1

      Exactly 100% Ian, you're correct and I agree completely with your comments. TradingView unfortunately does not operate its tester on tick data. I'm not sure why, probably a server resource limitation, but hopefully in the future they can add that feature as it would DRAMATICALLY improve the tester system and make it a far more accurate tool. In the meantime there really is no way around this on TradingView except to use your discretion by manually confirming your strategies. If the strategy encounters a significant amount of ambiguous trades (SL + TP being hit on the same lower timeframe bar) then it's probably not profitable

    • @oscare6211
      @oscare6211 Год назад

      @@TheArtOfTrading do you know another platform which help mitigating this stop loss problem?

  • @armyman3666
    @armyman3666 3 года назад +3

    Great video and great timing, as I am trying to figure out if my TV backtesting is reliable at all.
    Will this issue still be present if we only base our strategy on the ohlc values of the candle?
    That is, if the low is below the stop loss I am out, I don't care when during the bar that happened? And so on.
    Another thing that I have noticed, especially when running backtest using the replay mode, is that the stats provided by TV seems to be calculated only on a limited amount of bars, depending on your package, and not on all the candles included in the backtesting, and this makes them useless

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +1

      Yeah this problem I mention only applies to using limit orders in your scripts, or bars that hit your stop loss + take profit on the same bar. Most "simple" strategies ought to give relatively accurate results. And yes it sucks that TradingView only offer a set amount of historical bars per plan. It really isn't an ideal platform for simulating testing on lower timeframes where historical bars are very limited. For me this isn't an issue as I mostly trade the 1HR+ timeframes and I have plenty of historical data to test on

  • @ThetaPower
    @ThetaPower 3 года назад +2

    Good video, but leaves too many unanswered questions. Is there someplace that you do answer questions about your videos?

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +1

      This is an ongoing research project of mine - my advice is simply to not rely on the tester blindly. Always manually backtest your data to verify that it's accurate. It's unfortunate and means a lot of work, but it's the only way to avoid trading a strategy that appears profitable but actually isn't. I use the strategy tester in my personal scripts to identify markets that show potential, and then I manually backtest them the old-fashioned way using a spreadsheet. It's slow but it works and I've discovered a number of profitable strategies this way. The tester can help you narrow down which markets "might" be profitable but can't tell you definitively which ones are, so my advice for now is just don't depend on your automated testing results to inform your trading decisions

    • @ThetaPower
      @ThetaPower 2 года назад

      @@TheArtOfTrading Thank you for the thorough response! I'm working on a Renku "based" system right now. Because I've been a PC programmer for years, I'm now in the final stages of writing a backtest program that I know will accurately be able to test all time frames and indicators I want to test on a tick-by-tick basis. It's a lot of work, but I could not find any testing system that was accurate with Renko bars -- and I like to program so... I find it helps me to understand indicators because I have to write them myself. Now to the point, I wanted to use TradingView but the reality is that the brick height needs to be dynamic and no software does that unless you stop, change, restart and etc.

    • @raresouls9897
      @raresouls9897 2 года назад

      @@ThetaPower done?

  • @albertjohn3350
    @albertjohn3350 2 года назад +2

    can you avoid it by using "use_bar_magnifier" argument in strategy declaration statement?

  • @mattc4153
    @mattc4153 2 года назад +3

    Oh yes, I used to backtest a lot and learned this too. Also, be cautious when using multiple timeframes because you can't use closing prices for larger timeframes either. You must know the price at the time of the shorter time frames. I'm considering learning Tradingview if it can meet my needs.
    Can you create strategies across multiple timeframes against a bucket of symbols?

  • @mustafaalhayali
    @mustafaalhayali 10 месяцев назад +1

    is this issue still present till today?

  • @TheArtOfTrading
    @TheArtOfTrading  3 года назад +3

    🚩 My Socials & More FREE Content: theartoftrading.com
    🚩 FREE Pine Script Basics Course: courses.theartoftrading.com/courses/pine-script-basics-course
    🚩 Pine Script Mastery Course: courses.theartoftrading.com/courses/pine-script-mastery
    🚩 My Indicators & Strategies Course (Steal My Code!): courses.theartoftrading.com/courses/my-indicators

    • @abs5244
      @abs5244 3 года назад

      what about if you use calc_on_every_tick?

    • @jasbirsinghbhatti5151
      @jasbirsinghbhatti5151 3 года назад

      Hello sir!! How can we code that..
      If price whenever touch the SMA, signal should be given buy.. and
      As soon as price will go down by 2% from the SMA, signal should be given sell.
      How can we code this sir.. please helps from india hope you will focus on my comment and you will definitely reply for help...❤️ ..

  • @זאביגורוב
    @זאביגורוב 2 года назад

    All time frames is the same, there is noise on qm and daily and weekly...ask any pro, there us no difference between 1m and weekly...
    Backrest manually all pairs on 1m, then all pairs on 5m and then 30m...

  • @FelixLanzalaco
    @FelixLanzalaco Год назад

    have given up the hope any of this will be sorted. In the wrong run its less headache to code your own backtester and load in exported excel files with all the indicator data.

  • @jazonsamillano
    @jazonsamillano Год назад

    The Bar Magnifier functionality in TradingView supposedly fixes this problem, but it's only available for Premium subscribers. I only have a Pro+ subscription right now, so I can't try it. Has anyone tried the Bar Magnifier?

  • @thesinglemaestro
    @thesinglemaestro 11 месяцев назад

    I back tested a top secret strategy with 87% profitable rate and profit factor of 2.75 and max draw down 0.09%. I back tested it and manually tested it, it was spot on. I think I might sell it.

  • @finanzferdinand9874
    @finanzferdinand9874 9 месяцев назад +1

    Test on 1 minute chart then

  • @WillCouch
    @WillCouch 4 месяца назад

    Wow very eye opening. What backtesting software/ coding language would you recommend currently?

  • @ezrakoper
    @ezrakoper Год назад

    Hello.
    Can you please repeat the test with the latest release offering to split each d candle to small time frames in order to resolve such issue? And let us know the difference with/without the in depth candle break

  • @alexkazemi4328
    @alexkazemi4328 2 года назад

    HI, because your method for placing stop loss is wrong. You should not put your stop loss in that place. You need to put your stop loss at least lower than low of the candle which your order execute.

  • @MV-sy9bz
    @MV-sy9bz Год назад

    golden video !

  • @714trader
    @714trader 3 года назад +4

    Would adding the script to a 1 min. Tf give you a more accurate backtesting?

    • @elivomlande2527
      @elivomlande2527 3 года назад +1

      Probably not. The Script would then run on 1min Tf if I understand your comment correctly.
      You may want to write a Multi-Timeframe Script to be able to make decisions for individual timeframes.
      It should be the same function that indicators use for chosing tf in indicator-gui.

    • @mickvandenboer8556
      @mickvandenboer8556 3 года назад +2

      Yes it will. In case you base your indicator or entry/exit conditions on a higher timeframe (smaller doesn’t work of course), while you run your strategy in the tester on a smaller timeframe, it can actually see and calculate correctly.
      In case you run a strategy with entry/exit conditions based on multiple timeframes, you could add code in your script to only give entries and exits between a certain date range, then use the replay function and let it run. This way you will get ‘real’ data and statistics. Hope this helps ;)

    • @714trader
      @714trader 3 года назад +1

      @@mickvandenboer8556 it seems like TV backtesting waits for closed bars then calculates whether SL/TP happened. Since the logic here specifically states yesterday’s Daily high with set SL/Tp. If we were to use 1m or even smaller tf. Surely TV would see the 1m candle close below the SL before heading up to tp. Unlike depending on the 1h close where it could travel down 7 but close up15 and not “hit” SL according to candle close.

    • @714trader
      @714trader 3 года назад +3

      @@elivomlande2527 it been nice if Matthew showed the test data on the 1m. That would easily give us an answer

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +2

      @@714trader The problem with testing on the 1 minute timeframe is that even on the most expensive TradingView plan and the bar reply tool, I can only load a few thousand bars onto my chart at once. So testing on a 1 minute timeframe will only give me data for a few days, maybe a week max, and then I will run into the historical bar data limit :( but theoretically that would make it more accurate if we could do that

  • @davidcubberley9659
    @davidcubberley9659 7 месяцев назад +1

    why not use 1 minute chart?

  • @curiouskittycat5977
    @curiouskittycat5977 2 года назад +1

    Good job!
    Would it help to trade on lower time frames as in 15mins? It would get triggered closer to what would happen in real time?

  • @themtbkids
    @themtbkids 3 года назад +2

    Your strategy is based on candle closes LOL... problem is you not trading view loll

    • @mickvandenboer8556
      @mickvandenboer8556 3 года назад +1

      You clearly didn’t understand a word he said. Newb. He’s only saying IF you use a strategy based on candle closes, you fix one part of the problem. Same goes with for example a trailing take profit or stop loss in the tester, it will give completely incorrect results since it can’t read what happened during a candle based on historical bars.

    • @themtbkids
      @themtbkids 3 года назад +3

      @@mickvandenboer8556 no you dont understand like him. Who cares what it does during the day , its programed to act with a closed candle.. you know its what you suppose to do.. if you trade day candles you need to wait for the close of the candle.. like week candles need to wait it out.. but yeah most people dont understand so I guess its normal you think he is right

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +3

      @@themtbkids Hi Cadzilla, not sure what your argument is here as I'm not arguing with your ideas in the video and in fact I agree with you 100% lol.
      The strategy demonstrated in this video was requested by a student of mine. My advice to him was the same as yours - you are far better off basing your trading decisions off candle closes. But some people like using stop orders to buy & sell breakouts. This video explains why you can't do that accurately with the tester system, and my advice is to base your trades on closes.
      But the issue remains - if your trade hits your stop loss AND your take-profit on the same bar there is a chance the tester will record it as a win when it was actually a loss, so be cautious even if you trade candle closes

  • @evergideon8930
    @evergideon8930 2 года назад

    You are right but that's what the use_bar_magnifier function is meant for.
    Premium users won't have this ish.

  • @towe1450
    @towe1450 Год назад

    Thanks for your video and the overall great content. Does the new "Use bar magnifier" option overcome the issue you mentioned in this video?

    • @jazonsamillano
      @jazonsamillano Год назад

      I believe so according to the documentation, but I haven't tried it because my subscription is only Pro+, and Bar Magnifier is only for Premium subscribers.

  • @RMFP
    @RMFP 3 года назад +3

    Quality info, thanks 👍 another thing that I've found to make a big difference between TV back tests and trading performance is spread. It's still a great tool to use as a guide as you say though.

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +3

      Definitely Richard, good point that I forgot to mention in more detail. Spread is a killer for many lower timeframe strategies. You can simulate it in your scripts, but only if you have a consistent spread through your broker which is rare. Most brokers have spread spikes during certain times of day which can ruin some strategies that appear profitable through the tester

  • @flynnscott3187
    @flynnscott3187 Год назад

    You did a great job with your video, thanks for sharing , I want to know that Can you implement custom timeframe candles using PineScript ? Because the timeframe for free accounts be some limited ,like that not 10min timeframe .

  • @aceofwaters
    @aceofwaters 2 года назад

    Its at the 'close' of the candle usually by default. With SL so close, no doubt it will linger in and out. Every strategy I have ever created was far more profitable and consistent WITH 'close' of candle. DO A VIDEO ABOUT HEIKEN-ASHI CANDLES and 'UNREALISTIC' results.

  • @edwardsciacca8012
    @edwardsciacca8012 Год назад

    your problem within a candle stick bar would be Corrected using a MTF/Multi- Time- FRAME . if the Lowest Time frame not true . no Trade . Also my Opinion if it is not live data it don't work as fast . meaning using 1hr Candle to trigger a trade is useless without knowing what the 1min is doing . TRY bar setting at HIGH/ LOW/ CLOSE VWAP . also ADD VolumeAccumulation which sec by sec streaming data .

  • @danielracovitan9779
    @danielracovitan9779 2 года назад +1

    that's why you don't make strategies where you expect the trade to be entered and closed within the SAME candle ; solution : you use a lower timeframe

  • @gkr8147
    @gkr8147 Год назад

    Disagree.. you are only seeing it one side... in this , dont keep SL for strategy testing... as simple as that..or get trades and SL done based on 'close prices' (which u hv mentioned) or keep SL lower (and you should calculate by history of trades for last 2 months or so) trading view strategy testing is effective, but it depends on the pine code and strategy itself.. you cant blame system by using not good strategy..

  • @intevolver
    @intevolver 2 года назад

    you make this problem easy enough to solve by calculating intrabar... so why hasn't TV already fixed this?

  • @dann3401
    @dann3401 8 дней назад

    The candles in question did not close below your stop. Looks to be the criteria applied. Thats great in my opinion because that is how i trade so I think its perfect. Prob needs some coding changes if you want wicks to stop you out.

  • @SohaMDeY_07
    @SohaMDeY_07 Год назад

    The strategy is correct…it is following the rule of stoploss after candle closing ✅

  • @JargBeatzz
    @JargBeatzz 2 года назад +8

    In your code property you can specify when your code recalculate. On each bar or each tick or after an operation

    • @freenrg888
      @freenrg888 Год назад

      Hi Louis, where exactly would that be done?

    • @JargBeatzz
      @JargBeatzz Год назад

      @@freenrg888 in the indicator property Scroll down you've got 3 box you Can tick

  • @simonealbertario9888
    @simonealbertario9888 Год назад

    Hi, I need help converting a strategy script into study, can you help me? Thanks in advance

  • @hadyboustany7222
    @hadyboustany7222 2 года назад

    I think this problem can be avoided if we backtest strategies only on candle close.

  • @vladimirhorowitz
    @vladimirhorowitz Год назад

    So basically everybody should learn to script in Python? Is the strategy tester more accurate if you use Python to make your scripts?

  • @otmanalami6621
    @otmanalami6621 2 года назад

    I needed this video

  • @markus_2005
    @markus_2005 Год назад

    if the candle was closed under the stop Lost and you trigger position.close() instead of using the stop=... paramter, then it should be fine or not? But the big Problem of using the position.close() call is, that you can miss your stop lost strongly, because the close/open actions take process after the candled closed. Right?

  • @pierodicarlodallabona
    @pierodicarlodallabona 3 месяца назад

    Problem is a OHLC of H1 Candles;
    Is there any way to do this backtest with Tick by Tick feature?

  • @nikhilbagalkotkar716
    @nikhilbagalkotkar716 2 года назад

    Instead of calculating on every tick if u r playing on closing bar trading view looks good to me

  • @JamesHeath-tw4cs
    @JamesHeath-tw4cs 10 месяцев назад

    In all of your mastery course you are advertising that learning pinescript increase the speed of backtesting, however now you are saying that we should always manually backtest regardless? Make you sound less credible

  • @famousmidnight
    @famousmidnight 2 месяца назад

    This particular example isn't exactly true. On the 1 hour time frame when the signal was triggered, price never retraced after the close. We can see it on the chart, as long as your orders are filling on candle close this particular example shouldn't be an issue.. Those price retracements are within the candle that gave the long signal... not the close candle

  • @mahdyswessi325
    @mahdyswessi325 2 года назад

    So if we dont use SL and TP or just use one of them just stop loss for example and test the strategy on bar closes on 1-5 min chart that will give us better results ?
    What is the best solution you found till today after some Tv updates ?

  • @michaelionita
    @michaelionita 2 года назад

    I think meanwhile they have a strategy() parameter called calc_on_every_tick=true which could fix this?
    What do you think @The Art of Trading?

  • @Brajesh-LearnToTrade
    @Brajesh-LearnToTrade 7 месяцев назад

    Hi @The Art of Trading . i think its not wrong assertion. strategy system uses bar close in 1hour time frame. it doesn't matter if price went higher than your filled price in lower time frame. Can you show me a proof if price closed in 15 mins timeframe ( close) . so there is no issues with testing system. i have been testing it with paid version and with back testing and no issues so far.

  • @knightnxk2906
    @knightnxk2906 Год назад

    so would you argue it's better to have less trades on specific timeframe to backtest manually the strategy?
    'cos like having 300+ trades it's a long time :v
    but yeah i guess you need endure pain for the biscuit

  • @serkillz6426
    @serkillz6426 6 месяцев назад

    I just made my first script and based it on scalping the 1-minute time frame would this still be an issue I have to worry about? going to start testing this week on paper accounts.

  • @2AforAll
    @2AforAll Год назад

    it is stupid to have 3pip stop loss. it is extremely low. especially if spread about 2pip from the beginning. you enter 1 pip away from stop loss from the beginning.

  • @user-gq5fe6qp9j
    @user-gq5fe6qp9j 3 года назад +1

    Wow! What a bummer !!! I really relied on what you have showed us in a previous video here , emphasizing us the importance of back testing in Tradeview . And now you are telling us that is has no value anymore ?

    • @TheArtOfTrading
      @TheArtOfTrading  2 года назад +2

      Not that it has no value, just that certain scripts can produce inaccurate results if your script depends on intra-bar price action being accurate. Not all scripts require this, and I still emphasize the importance of backtesting - this video is just warning against using automated backtesting as reliable data without manually confirming the data. No backtesting data is 100% accurate, not even manual backtesting, but at least manual backtesting will give you the chance to identify potential problems with your script

  • @jayw6790
    @jayw6790 3 месяца назад

    No yeah this is true I had a trading sceipt that won 96 percent of trades and it made a new trade every minute. It would've been inhumanly possible to trade it, if a bot did im sure it would've been profitable but not by lot.

  • @f.b.i5148
    @f.b.i5148 Год назад

    Build your own backtester! Tradingview backtester is not accurate thats why most algo trader do not use tradingview.

  • @Berghiker
    @Berghiker Год назад

    BTW. I don't trust any strategy tester. It gives you too many signals to enter. That's not realistic for any trader. I only want the best signals, maybe 5 to 8 of them per day. That's it!

  • @jaimemachado4531
    @jaimemachado4531 Год назад

    Hi, I have been using the High and Low price of each bar instead of the Close, because if the event that I am testing happened in less than the timeframe I am using, surely the event is into the range of Higher or lower value of the bar, so the test have to detect it.

  • @rhesovelver660
    @rhesovelver660 Год назад

    So if the tool doesn't work, if nothing works here, it's just problems and more problems, I better throw a coin in the air, so things will work out better for me. Damn !😡

  • @kch14ng
    @kch14ng 3 года назад +1

    Thank you for this important info regarding the limitations of TV backtesting system.

  • @michaelaldan6969
    @michaelaldan6969 Год назад

    100.000 traders are now asking you. : what strategy is that, can I use it? .......... sigh...lol

  • @ltsmash9544
    @ltsmash9544 2 года назад

    It's now Sept 2022 - I wonder if this is till the case or if TradingView found the bug and resolved it?

  • @spiki_x6863
    @spiki_x6863 Год назад

    Also, you don‘t have a straightforward option to select weather multiple position merge or stay separated, no hedging and no leverage. It doesn‘t really replicate any real life trading situations.

  • @incodewetrust8862
    @incodewetrust8862 11 месяцев назад

    hi i found out that when the strategy exit one position it automatically enter oposite postion, there a way for example exit long but wait for better condition for another position or the same ?
    1) does pines script loop trhought the code or it loop only on every candle close because i think it could be easier you could exit position in price action intrabar no only wait for close or open.
    for exemple i have been trying to if i enter position X price then there runup profiti 2% then the price start to go down if it goes down 25% from that 2% hight exit position but not working please help with ideas !

  • @phildunphy6268
    @phildunphy6268 2 года назад

    Sorry, but I can’t agree here!
    Either TV backtesting got way more reliable today, or you simply haven’t coded your strategy right.
    It took me some time to get my strategies to work 100% correctly but now the real trade results match the backtesting results to the cent accurately (only if there are big pumps/drops within the closing candle I experience some slippage, but that’s on Binance not on TradingView).
    So I can encourage everyone to work on the strategy until it will match the real trade results - and as said: it‘s possible!

  • @mrphotographyengineer3500
    @mrphotographyengineer3500 2 года назад

    a 15 minute long video just repeating the same damn sentence and didn't even mention tradingview bar magnifier???????? waste of time

  • @borisraguza8693
    @borisraguza8693 Год назад

    You loose aprox 10% on most strategies that show higher profitability if you use after candle close.

  • @corevil
    @corevil Год назад

    Hi, what if TP and SL where dynamically fixed prices?

  • @scuzzyhoulihan9853
    @scuzzyhoulihan9853 Год назад

    people trust it when its under 50%? I would never use anything lower than 70%.....

  • @AbdulRahmanGhalayini
    @AbdulRahmanGhalayini 4 месяца назад

    are you using same “entry name” as trade id for each trade? This is where you are going wrong

  • @ComradeMorlac
    @ComradeMorlac 8 месяцев назад

    Yeah but who the actual f..k puts a sl 5 pips away from the entry? xD

  • @aspenmallery
    @aspenmallery 2 года назад

    I mean this isn't so much an issue with the backtesting engine as much as it is with the pinescript code. idn't it? Your conditional is probably checking the stop loss price based on the open, high or low, of the session's stick timeframe instead of the close. If you check the stoploss after close on the same candlestick resolution, then it shouldn't trigger your stoploss. If you are coding seperate to pinescript (javascript, python, via API) and just using pinescript for backtesting, then you'd also have to double check your logic is 100% the same in behavior
    EDIT: Another solution would be to add a delay period for your stop loss. Wait for so many bars... then execute. Just some ideas :D