Build a Moving Average Crossover Backtester in 20 Minutes

Поділитися
Вставка
  • Опубліковано 22 гру 2024

КОМЕНТАРІ • 71

  • @jaesall3519
    @jaesall3519 Рік тому +2

    i'm jealous of how good this guy explained everything i love it

  • @evetsegap
    @evetsegap 2 роки тому +1

    Wow. I've been looking for something like this for quite awhile. Thank you!!!!! Subscribed and liked!

  • @brandonk5389
    @brandonk5389 3 роки тому +1

    thank you so much for this. it was very easy to understand and pause and do it rather than just downloading.

  • @tomtom4903
    @tomtom4903 3 роки тому +3

    Thank you your time to made the Video. I learned alot from this vid.👍

  • @richherbert7791
    @richherbert7791 3 роки тому +3

    Fantastic video! Thank you for sharing! I had no idea that thinkscript had so many capabilities until I started watching your videos. Time to start tinkering with this backtester :-)

    • @TOSIndicators
      @TOSIndicators  3 роки тому

      Awesome to hear that, Rich! Hope this is just the beginning of your thinkScript journey.

  • @TheUndertaker19
    @TheUndertaker19 9 місяців тому

    It’s possible to include result label % of effectiveness for the back tester as you did in other indicator back testers?

  • @cryptotrain6334
    @cryptotrain6334 2 роки тому +1

    Outstanding job brother your a great teacher

  • @docjava1
    @docjava1 2 роки тому +2

    Very high-quality video! Very helpful.
    I think would be interesting, is if we could set up a series of parameters and perimeter ranges and optimize over a specific period of time. Then change the period of time and see how the optimized parameters perform in order to test the robustness of the set up. That is to say, over optimize over a given period of time, and then test over a different period of time. This would enable us to tell a little bit better whether or not we have over optimized a given set up. Thanks again for all your fine efforts!

  • @SatishNyala
    @SatishNyala Рік тому

    I am trying on my TOS but it won't show anything, FYI i am not a coding guy but i downloaded script from your website as mentioned.

  • @serendipity1328
    @serendipity1328 Рік тому +1

    Hello, you have added longentries and shotentries condition only in Buy_To_Open and Sell_To_Open orders and not for Sell_To_Close and Buy_To_Close orders! Why is that? If a Buy_To_Open position is open, then won't it execute Buy_To_Close to close it or its not allowed and only executes Sell_To_Close?

    • @TOSIndicators
      @TOSIndicators  Рік тому

      The opening position is the only one that requires the longEntries/shortEntries boolean checks. A trade can only be closed, if it is already open.

  • @wildgoose82667
    @wildgoose82667 Рік тому

    I'm an old dog trying to learn a new trick. How would I change the label that displays at entries and exits? Right now it shows the name of the file. What if I wanted it to be "ENTER" and "EXIT" and white instead of purple? Thanks in advance

  • @VentureNW
    @VentureNW Рік тому

    This works really nicely. Is there a way to remove the text from the Arrows? When I am zoomed out, its not really needed... just arrows works for me. I looked at the code a bit, and I see over on the look and feel section - HideTitle, but I am really a noob with this stuff and cannot for the life of me figure it out. Any help you could offer is greatly appreciated.

  • @yahmef1990
    @yahmef1990 5 місяців тому

    You the best we appreciate your effort 👌

  • @abhilash0518
    @abhilash0518 Рік тому

    How do we mention, in the script, the MA is aligned to Day or 1hr etc

    • @TOSIndicators
      @TOSIndicators  Рік тому

      Hi Abhilash - Here's a video which walks through how to plot a daily time frame's MA on a smaller time frame chart: ua-cam.com/video/-j7oSR2AuD8/v-deo.html
      Same concept applies to the 1-hr chart as well.

  • @kishoresharma8697
    @kishoresharma8697 3 роки тому

    How can I use this moving crossover script to scan the stock list for long/swing trade?

  • @snail897
    @snail897 4 роки тому +1

    Thank you. This is very useful.

    • @TOSIndicators
      @TOSIndicators  4 роки тому

      Glad you liked it! And thanks for the support. :-)

  • @NCM393
    @NCM393 2 роки тому

    Can it buy options for you?

  • @EIStudent
    @EIStudent 3 роки тому

    Great tutorial! Insane value!

  • @neuvocastezero1838
    @neuvocastezero1838 2 роки тому

    Thanks for the video. It's interesting that it's not necessary to include the "Longentries" and "Shortentries" booleans in the closing AddOrder statements. There's a lot of idiosyncrasies that are making it hard for me to learn Thinkscript.

  • @muthiahlakshmanan5104
    @muthiahlakshmanan5104 2 роки тому

    helo, thx for sharing. 1. How do i scan for stocks where 8 ma crossing above 20 a day ago in daily 2. how do i scan for stocks where 8 and 20 are same. i would appreciate your help. thanks

    • @TOSIndicators
      @TOSIndicators  2 роки тому

      This tutorial should give you an idea of how to define moving averages, along with crossovers, which you can use in the scan tab as well (just make sure to set the aggregation period to a daily time period).

  • @kerrymorrison4801
    @kerrymorrison4801 2 роки тому

    I cannot get TS file to open. It says theres an error saying file isnt playable? What did I do wrong

    • @TOSIndicators
      @TOSIndicators  2 роки тому

      Hi Kerry - If you need help importing the indicator into ThinkOrSwim, here's a step by step guide that should help you: tosindicators.com/thinkscript/how-to-import-thinkorswim

  • @tombrown7187
    @tombrown7187 3 роки тому +1

    Amazing video...Thank you!!

  • @Mr_Duck_RVA
    @Mr_Duck_RVA 2 роки тому

    Great script. Although it doesn't seem to work if you do say a 1 Day 3 minute chart. Are there any min requirements in terms of timeframe you can test with?

    • @TOSIndicators
      @TOSIndicators  2 роки тому

      You'll need to make sure you have enough historical data on your charts, for the backtester to work correctly. Try expanding to to more days, to give more 3-min data points.

    • @Mr_Duck_RVA
      @Mr_Duck_RVA 2 роки тому

      @@TOSIndicators Thank you I’ll give that a try. You’re content is awesome. Keep it coming. Maybe do a tutorial playlist for thinkscript beginners

    • @Mr_Duck_RVA
      @Mr_Duck_RVA 2 роки тому

      Just gave it a try. If you do a 3 min 30 day chart using the 9/89 EMA clearly there's an uptrend but the floating PL shows negative profit. Im not understanding whats going on here? Am I doing something wrong?

    • @TOSIndicators
      @TOSIndicators  2 роки тому +1

      You'll need to dig into the report, analyze the trades your script is taking, and use that as a starting point to keep refining/iterating.

    • @Mr_Duck_RVA
      @Mr_Duck_RVA 2 роки тому +1

      @@TOSIndicators ah okay. So the script is taking trades based on the entries and exits settings

  • @tylereastburn73
    @tylereastburn73 2 роки тому

    how do i get this to work with option entries and exits instead of shares?

    • @TOSIndicators
      @TOSIndicators  2 роки тому

      Hi Tyler - you can use the option functions inside of ThinkOrswim, though they are fairly limited: tlc.thinkorswim.com/center/reference/thinkScript/Functions/Option-Related

    • @tylereastburn73
      @tylereastburn73 2 роки тому

      @@TOSIndicators thank you for getting back to me after digging a little further I don’t think I’ll be able to do exactly what I’m looking for so I’ll have to just use on demand and play it out on a few random days where I don’t know the outcome

  • @Dragonlord9
    @Dragonlord9 2 роки тому

    How to create crossover scanner alerts for all stocks that will instantly and automatically pop up as an alert?

    • @TOSIndicators
      @TOSIndicators  2 роки тому

      You can use this tutorial as a guide on creating a scan with alerts: ua-cam.com/video/fI8l3EBuDa0/v-deo.html

    • @Dragonlord9
      @Dragonlord9 2 роки тому

      @@TOSIndicators I meant for the thinkscript to create scanners with alerts

  • @uyghurtradingclub8543
    @uyghurtradingclub8543 3 роки тому

    Your videos are amazing and very helpful. I was wondering if we can Loop in TOS, where it can consistently buy when the stock touches one of the moving averages? Thank you!

    • @TOSIndicators
      @TOSIndicators  3 роки тому +2

      Hi BTD - I appreciate the kind words, thank you. I don't believe there is a way to "loop" orders in TOS. Each "automated order" needs to be triggered individually, for each stock/ETF.

    • @uyghurtradingclub8543
      @uyghurtradingclub8543 3 роки тому

      @@TOSIndicators Thank you!

  • @hakenly
    @hakenly 2 роки тому

    I cannot get this to work at all. I even downloaded the study and imported it, still doesn't do anything. Doesn't even plot the MA. I can't get the FloatPL study to load either. I clicked on the check box that says "Display FloatingPL study with strategies", still no success. Any help would be great

    • @TOSIndicators
      @TOSIndicators  2 роки тому

      Hi Haken - You'll need to make sure you're on the 'Strategy' tab when importing a STRATEGY.ts file (ie. a backtester).

    • @hakenly
      @hakenly 2 роки тому

      @@TOSIndicators Thank you I got it working now. Love your videos, it's so helpful and high quality too.

  • @mikemerlin4020
    @mikemerlin4020 3 роки тому

    Difference between this and the volatility box?

    • @TOSIndicators
      @TOSIndicators  3 роки тому

      Hi Mike - the two are quite different (and unrelated). The Volatility Box is based off of our custom models, for an instant framework around price and volatility, whereas this tutorial walks you through how to build a backtester to measure / compare moving average crossovers.
      Link to learn more: tosindicators.com/volatility-box

  • @develteam3095
    @develteam3095 3 роки тому +1

    Brilliant - thank you

    • @TOSIndicators
      @TOSIndicators  3 роки тому +1

      Thank you! Glad you liked the tutorial.

  • @SonSon-vo1ib
    @SonSon-vo1ib 3 роки тому +1

    When I entered (longentries), it created an error

    • @TOSIndicators
      @TOSIndicators  3 роки тому +2

      You can download our final version of the code here, and compare it with yours to see where you may be facing issues:
      tosindicators.com/backtesters/moving-average-crossover

  • @matatik
    @matatik 3 роки тому

    Could you PLEASE help us build multi timeframe (5 TIME FRAMES 3m,15, 1H, 4H, 1D) Mov. Average Crossover strategy with buy/sell signals. I'd greatly appreciate it. Many thanks in advance.

    • @TOSIndicators
      @TOSIndicators  3 роки тому +2

      Sure, I can add a MTF MA Crossover indicator to the backlog of ideas for future tutorials.

    • @ThunderGOG
      @ThunderGOG 3 роки тому

      @@TOSIndicators have you done it yet?

  • @bestdjintown
    @bestdjintown 2 роки тому

    Great video, this would be golden if you could make the exit strategy based % gain / or loss, such as close at 5% below, or 10% above entry.

    • @TOSIndicators
      @TOSIndicators  2 роки тому +3

      You can - just need to include the set percentage in your AddOrder() function, for the closing orders -- both stops & targets.

  • @Romanpax
    @Romanpax 3 роки тому

    How to show below section of earnings?

    • @Romanpax
      @Romanpax 3 роки тому

      16:19

    • @TOSIndicators
      @TOSIndicators  3 роки тому +1

      I think you answered your own question with the timestamp :-).

  • @mikemerlin4020
    @mikemerlin4020 3 роки тому

    Awesome!

  • @ceptember.
    @ceptember. 2 роки тому

    Awesome sauce

  • @dan721
    @dan721 4 роки тому +1

    Nice

  • @Pj-ej1tq
    @Pj-ej1tq 2 роки тому

    I could not get it to work

    • @TOSIndicators
      @TOSIndicators  2 роки тому

      Hi Pj - you can download from our website for free, using the link in the description box.

  • @BubbaBubs1
    @BubbaBubs1 2 роки тому +1

    Nerds go through this stuff way too fast. Do you have any videos on this that are absolute barney style?