Trading with Python: Simple Scalping Strategy

Поділитися
Вставка
  • Опубліковано 25 вер 2024
  • Welcome again! In this video we will discuss a trading strategy that has shown remarkable potential. Our Python-based approach to this simple scalping system has yielded over 200% returns in just a three-month testing period, demonstrating its effectiveness and potential for both manual and algorithmic trading styles.
    Our focus is on a trading strategy that can be easily optimized and adapted to your trading needs. The strategy is straightforward, making it ideal for both new and experienced traders. We use a 5-minute timeframe to accelerate trading and increase the number of trades, optimizing the risk-reward ratio and other key parameters through Python and numerical backtesting.
    The Python code for this backtest is readily available for download from the link below,this allows you to follow along, experiment, and tailor the strategy to your trading preferences. We utilize two moving average curves to identify market trends: a fast moving average and a slow moving average. This helps in determining uptrends and downtrends, guiding our decision on whether to take long or short positions.
    Additionally, we incorporate Bollinger bands to pinpoint entry points for positions.
    We also discuss how to set stop-loss (SL) and take-profit (TP) distances by considering market volatility and using the Average True Range (ATR) indicator. The exact numerical values for the lengths of the moving averages and the parameters of the Bollinger bands will be detailed in the coding part of the video.
    💲 Discount Coupon for My Course on Algorithmic Trading:
    bit.ly/CouponA...
    The Python Code is available here:
    drive.google.c...
    The data file:
    drive.google.c...

КОМЕНТАРІ • 272

  • @bravesirdonald
    @bravesirdonald Місяць тому +3

    Great video! Concise and clear explanations. In my backtesting, I found this strategy only worked well in 2024. Running this strategy on previous years did not yield the same results. Market behaviour does change over the years.

    • @fidgetgadget3475
      @fidgetgadget3475 Місяць тому +1

      I suspect the big actors algorithmic trading impact the market properties

    • @CodeTradingCafe
      @CodeTradingCafe  Місяць тому +2

      The market tdoes change we can fit the parameters every month to solve this. But the biggest drawdown of this strategy is the short TP distance that can be covered by trading fees.

    • @vassiliscapsis5828
      @vassiliscapsis5828 28 днів тому

      @@CodeTradingCafe this is what I think and I put in my latest post

  • @daithi007
    @daithi007 8 місяців тому +7

    Interesting video, thank you for making it.
    1/ I'd like to see it run against a paper account.
    2/ I'd like to see the code for interacting with a brokerage like Interactive Brokers.
    3/ I'd like to see all fees included too.
    Thanks!

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Thank you for your feedback, makes sense, I will see to try it live, I will be tuning it first for live trading and better results.

    • @ranitbose9609
      @ranitbose9609 8 місяців тому +1

      why don't you do it?

    • @benmichaeloracion
      @benmichaeloracion 7 місяців тому

      @@CodeTradingCafe looking forward to the subsequent videos related to this. I'm hoping you could do those things he mentioned.

  • @athanasrenti4535
    @athanasrenti4535 8 місяців тому +7

    Another well-thought out video, concise and helpful! Many thanks!

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      Glad you enjoyed it! Consider the challenging spread in live trading... I still have some ideas to try.

  • @cap00
    @cap00 8 місяців тому +7

    Yes, test it out. Nothing gets done by thought 👌

    • @Doors_of_janua
      @Doors_of_janua 8 місяців тому

      Brother, THAT! Is one of the biggest insights anyone can have in their life! Gold

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +2

      Thank you will work something out.

    • @AwesomeMrT-007
      @AwesomeMrT-007 5 місяців тому

      @@CodeTradingCafe Can you link the video of the paper trading?

  • @cachecoder
    @cachecoder 8 місяців тому +16

    I think it would be interesting seeing it traded on a paper account. Throw it up a few different tickers, a few up trends, a few down trends, and a few that are just oscillating. Maybe even some ETF pairs. Cool little video.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +3

      I agree, I am getting more curious about it, I only need to test the RSI trend detection instead of EMA to see if I can improve the results further... at then end I will try it live for few weeks.

  • @strathausen
    @strathausen 8 місяців тому +3

    Very cool, thanks! Going to give it a try this week.

  • @trantrunghieu5059
    @trantrunghieu5059 7 місяців тому +1

    Have any tools or backtest library that we can backtest the strategy with the spreads? Examples add the spreads with 1 pips or 0.5 pips for the backtesting.

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      Backtesting.py doesn't do it this way, we can however add a commission percentage and usually we include all trading costs there. But in my recent video I am testing this strategy live on the market so the spread is taken into account check this out: ua-cam.com/video/bZhtvvFm17A/v-deo.html

  • @abdsh422
    @abdsh422 8 місяців тому +4

    I think the calculation of the SL (Stop Loss) and TP (Take Profit) needs to be re-evaluated, as sometimes the TP/SL is less than 5 pips, which most brokers will not accept. With such low values, the probability of having a correct prediction increases, and the drawdown will be less, which might look impressive in backtesting. However, in reality, it may not meet expectations. Also, the ratio between the SL and the TP is low, ranging from 1.1 to 1.5. I believe this is bet low, especially when considering a 40% win rate.
    With that being said, the video is great.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      Hey, thank you for your comment. I think you are right regarding TP/SL in live trading, mostly also because of the spread it will interfere with the TP and SL values and so the ratio... therefore the results will be different then the optimization results we obtained using the method from the previous video. It requires more work to tune it live and observe the results, kind of a slow mission but very much needed.

    • @abdsh422
      @abdsh422 8 місяців тому

      @@CodeTradingCafe Hey, please give me your opinion in the below result. i tested it on all the 3 years. SL*.6 : TP*1
      Equity 5k for all the below tests. used only 10% on the Equity with leverage 1:100
      Start 2019-09-30 04:05:00
      End 2022-09-30 20:55:00
      Duration 1096 days 16:50:00
      Exposure Time [%] 20.582378
      Equity Final [$] 34989.80489
      Equity Peak [$] 36480.17059
      Return [%] 599.796098
      Buy & Hold Return [%] -10.327037
      Return (Ann.) [%] 68.798446
      Volatility (Ann.) [%] 37.190209
      Sharpe Ratio 1.849907
      Sortino Ratio 5.114766
      Calmar Ratio 5.060745
      Max. Drawdown [%] -13.594529
      Avg. Drawdown [%] -0.939743
      Max. Drawdown Duration 100 days 14:35:00
      Avg. Drawdown Duration 1 days 15:07:00
      # Trades 3662
      Win Rate [%] 41.316221
      Best Trade [%] 0.246082
      Worst Trade [%] -0.082279
      Avg. Trade [%] 0.005537
      Max. Trade Duration 2 days 19:35:00
      Avg. Trade Duration 0 days 01:19:00
      Profit Factor 1.177688
      Expectancy [%] 0.005562
      SQN 4.255942
      _strategy SignalStrategy
      _equity_curve ...
      _trades Size En...
      below is the same configuration but for the last 30k candle
      Start 2022-05-09 15:25:00
      End 2022-09-30 20:50:00
      Duration 144 days 05:25:00
      Exposure Time [%] 12.983766
      Equity Final [$] 7905.48107
      Equity Peak [$] 8242.20614
      Return [%] 58.109621
      Buy & Hold Return [%] -6.960914
      Return (Ann.) [%] 155.706664
      Volatility (Ann.) [%] 67.332812
      Sharpe Ratio 2.312493
      Sortino Ratio 12.086181
      Calmar Ratio 20.986106
      Max. Drawdown [%] -7.419512
      Avg. Drawdown [%] -0.98711
      Max. Drawdown Duration 16 days 00:15:00
      Avg. Drawdown Duration 1 days 00:47:00
      # Trades 577
      Win Rate [%] 42.980936
      Best Trade [%] 0.106255
      Worst Trade [%] -0.064893
      Avg. Trade [%] 0.008212
      Max. Trade Duration 2 days 03:10:00
      Avg. Trade Duration 0 days 00:39:00
      Profit Factor 1.245133
      Expectancy [%] 0.008242
      SQN 2.288319
      _strategy SignalStrategy
      _equity_curve ...
      _trades Size Entr...
      dtype: object
      the last 8 months with the same config
      return pd.read_csv(join(dirname(__file__), filename),
      Start 2023-05-05 02:20:00
      End 2024-01-06 00:55:00
      Duration 245 days 22:35:00
      Exposure Time [%] 22.142328
      Equity Final [$] 6963.44187
      Equity Peak [$] 7261.1544
      Return [%] 39.268837
      Buy & Hold Return [%] -0.743967
      Return (Ann.) [%] 56.940544
      Volatility (Ann.) [%] 38.461143
      Sharpe Ratio 1.480469
      Sortino Ratio 3.551477
      Calmar Ratio 4.640423
      Max. Drawdown [%] -12.27055
      Avg. Drawdown [%] -0.878754
      Max. Drawdown Duration 40 days 19:35:00
      Avg. Drawdown Duration 1 days 19:21:00
      # Trades 831
      Win Rate [%] 40.433213
      Best Trade [%] 0.099415
      Worst Trade [%] -0.083899
      Avg. Trade [%] 0.004222
      Max. Trade Duration 2 days 10:30:00
      Avg. Trade Duration 0 days 01:19:00
      Profit Factor 1.128922
      Expectancy [%] 0.004248
      SQN 1.523104
      _strategy SignalStrategy
      _equity_curve ...
      _trades Size Entr...
      I can get better results but it will be more of an overfitting. so I am trying to make sure that I am creating an adaptive strategy rather than over fitted one. (I tested it in a real account for the last 1.5 months and it is meeting the expectations)
      horizontal market is not the best situation for the strategy

  • @Maximus18.6
    @Maximus18.6 8 місяців тому +1

    First thank you so much for such amasing and excellent video. I propose to implement the long position scalping strategy using MACD as a signal for potential entry position, then wait until EMA 21 crosses EMA 50, price has to be on top of EMA 200 and VWAP, price hitting support line with red candles with acceptable body and long whicks, high body green candles and high trading volume to make sure the price will bounce to up trend, as higher number of confluence we have, higher is the probability to enter a good position. Additionall, it will be interesting to add market sentiment analysis to connect our technical analysis with fundamental analysis., stop loss and take profit same conditions you shiwed on the video.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      Hi, thank you for your input. Sentiment analysis can be implemented but I don't think it will play on anything below daily timeframe.

  • @juanbernal8105
    @juanbernal8105 8 місяців тому +2

    Excellent.
    I propose another idea of ​​regression to the mean.
    Consider VWAP and a channel some distance from the line.
    Only in high trading hours or with minimal volume does the price tend to return to the vwap trading point.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      Thank you, will try a combination of VWAP and volume.

  • @mohammedkerdoud2595
    @mohammedkerdoud2595 6 місяців тому +1

    great work, simple and effective, thank you for sharing those informations, keep going !!

  • @timnguyen2551
    @timnguyen2551 3 місяці тому +1

    hi, i love your videos ! Do you have the script to implement this strategy in Tradingview ? Thanks

    • @CodeTradingCafe
      @CodeTradingCafe  3 місяці тому

      Thank you for your support, I am just on python no other coding languages for now :)

  • @vassiliscapsis5828
    @vassiliscapsis5828 4 місяці тому +2

    Hi Ziad. I have a question concerning the ATR. This is the ATR of the 5 min candles, not the daily ATR. Is that so?

    • @CodeTradingCafe
      @CodeTradingCafe  4 місяці тому +2

      Hey, yes it's the 5 min ATR, I am still using one timeframe in this strategies.

    • @vassiliscapsis5828
      @vassiliscapsis5828 28 днів тому

      @@CodeTradingCafe hello again, reviewing everything again and again and trying to understand more about the details of the system. The ATR on the Eur/Usd and particularly on the 5min timeframe is extremely small, around 5 pips and the spread is around 1,5 pips so we should also consider it in the short term strategies. If am not mistaken brokers can provide both bid and ask prices and for scalping it would be better to use the proper value to buy or sell. I do not know if the backtest can handle this situation but a workaround would be to have both bid and ask price in the dataframe and then in "updated close" price to use the bid or ask if the signal is 2 or 1. For strategies on larger time frames 1 or 2 pips are not important. One more remark is that this strategy took 1671 trades in approx 100 days or almost 17 trades a day. One more reason to use some additional filters and prevent the system to take trades in hours with higher spreads (after US close, Asian session). Once again if the backtest cannot handle the from-to hours we could modify the total_signal accordingly.

  • @FighterFred
    @FighterFred 2 місяці тому +2

    Notice that if you want to use prop firms, their max open DD is 5%. To get that, lower the lot size. As to trading costs, EURUSD is the best. Many brokers have zero spread, and you can adopt a spread filter. As you're scalping, no swap required. For the equity curve, you need both the balance and equity as function of time.

    • @CodeTradingCafe
      @CodeTradingCafe  2 місяці тому +2

      Hi, thanks a lot for your input, we can also decrease the margin it also helps. I noticed higher timeframes are easier to trade from this perspective.

    • @RalphTradesz
      @RalphTradesz 9 днів тому

      Hi! Did you try this on prop firms?

  • @icometofightrocky
    @icometofightrocky 8 місяців тому +2

    Very interesting video ! Question - was there a particular reason you used the BB value of 1.5 rather than 1 and a length of 15 rather than the standard 20 ?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      The BB 1.5 is to increase the signal frequency, it's easier for the price to cross 1.5 than to cross 2, however 2 is more selective so maybe the win rate would be greater. for the length I usually compute it based on time so 5 min times 15 that't the time I want to consider for the signal, somehow answering the question, how much time/data should we consider for the signal?

  • @freshprincekd
    @freshprincekd 8 місяців тому +1

    Great video, you made it so easy to follow along. Would love to see you try a mix of ichimoku and bollinger bands for a strat.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Thank you, Never tried Ichimoku yet, it's a good idea.

  • @JoseMariaAcuña-v7k
    @JoseMariaAcuña-v7k 2 місяці тому +1

    HI hi!! nice to meet you! great video!. I have a cuestion. Where you get the information of the data file?

    • @CodeTradingCafe
      @CodeTradingCafe  2 місяці тому +1

      Thank you, your broker, yfinance or dukascopy.

    • @JoseMariaAcuña-v7k
      @JoseMariaAcuña-v7k Місяць тому

      @@CodeTradingCafe Sorry I have a problem with that, I have tried to use yfinance, I manage to export the historical data, but in the time part I get 00:00:00.0. So, I don´t have any data, and I don´t know why, if you dont mind, could you help me or guide me on that? Thanks

  • @sz8558
    @sz8558 8 місяців тому +2

    A problem you will have scalping fx is that once you pop up on the brokers radar that will shut your account..they dont want scalpers...so line up a bunch of accounts so you have options when one account is shut down.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Colleague of mine had a problem like this he was making good money until the broker froze his account for "suspicious trading", I guess it depends on the broker and the location of your trading, but yes we have expect anything especially if a bot is running non stop.

  • @notcool5498
    @notcool5498 5 місяців тому +1

    Awesome content as always, keep up the great work!
    Also wanted to share some small optimization for the calculations part of the code:
    def vectorized_ema_signal(df, backcandles):
    df['EMA_fast < EMA_slow'] = 0
    df['EMA_fast > EMA_slow'] = 0
    df.loc[(df['EMA_fast'] < df['EMA_slow']), 'EMA_fast < EMA_slow'] = 1
    df.loc[(df['EMA_fast'] > df['EMA_slow']), 'EMA_fast > EMA_slow'] = 1
    df['PreEMASignal'] = 0
    df.loc[(df['EMA_fast < EMA_slow'] == 0) & (df['EMA_fast > EMA_slow'] == 0), 'PreEMASignal'] = 3
    df.loc[(df['EMA_fast < EMA_slow'] == 1) & (df['EMA_fast > EMA_slow'] == 0), 'PreEMASignal'] = 1
    df.loc[(df['EMA_fast < EMA_slow'] == 0) & (df['EMA_fast > EMA_slow'] == 1), 'PreEMASignal'] = 2
    df['BackcandleSequence'] = df['PreEMASignal'].rolling(backcandles, min_periods=1).sum()
    df['EMASignal'] = 0
    df.loc[(df['BackcandleSequence'] == backcandles * 1), 'EMASignal'] = 1
    df.loc[(df['BackcandleSequence'] == backcandles * 2), 'EMASignal'] = 2
    df['EMASignal'] = df['EMASignal'].shift(1)
    df['EMASignal'].fillna(1, inplace = True)
    df.drop('EMA_fast < EMA_slow', axis=1, inplace=True)
    df.drop('EMA_fast > EMA_slow', axis=1, inplace=True)
    df.drop('PreEMASignal', axis=1, inplace=True)
    df.drop('BackcandleSequence', axis=1, inplace=True)
    def vectorized_total_signal(df):
    df['TotalSignal'] = 0
    df.loc[(df['EMASignal'] == 2) & (df.close = df['BBU_12_2.5']), 'TotalSignal'] = 1
    It might speed up the code a bit, and again much appreciate the content :)

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

      Thank you for sharing, and for your support as well.

  • @ThienNguyenHoang-u2g
    @ThienNguyenHoang-u2g 7 місяців тому +1

    How u can get real-time data from DEX ? (except u're allowed by owned in order to use API) or Is there any other way ? Tks

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      You need to have an account and stream data only if they provide a python API.

  • @LemonFX
    @LemonFX 8 місяців тому +3

    I would say that strategy would work best with trending instruments: indices, gold and USDJPY (and some other JPY pairs).

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      True, it works best in trends, but in ranging market it can dip in a drawdown.

  • @jroche1832
    @jroche1832 7 місяців тому +1

    Do you have a version where you are trading stocks rather than currency pairs? 'mysize' does not work when applied to equities or does this only work on currency trading?

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      Hi, it should work depending on the broker and the traded market, just need to know the allowed size fractions, and if you are trading an expensive asset make sure equity and leverage have enough money.

  • @veniciussoaresdasilva6614
    @veniciussoaresdasilva6614 5 місяців тому +1

    I think only in live account we can prove any strategy!!! Thanks for share.

    • @CodeTradingCafe
      @CodeTradingCafe  5 місяців тому +1

      Yes 100%, we did test it on a paper account using live data, the results are published in subsequent videos.

    • @lemiserablefranc-macon9997
      @lemiserablefranc-macon9997 5 місяців тому

      Hi, thanks for your answer! What I tried suggest was publishing the code that was used in the demo account. Yesterday I got several errors when move to demo account. Thanks for share again. I work in my RL integration and I still looking for other ideias to integrate on my RL. Have a great day.

  • @przybjul
    @przybjul 7 місяців тому +1

    Hey, when you generate signal, do you take into account that real trade should be open from the next candle?

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      Yes it executes at the close of the current candle or the opening of the coming candle.

  • @DanielContreras-decu
    @DanielContreras-decu 8 місяців тому +1

    How can you put this python code to work in Metatrader 4, so that it opens and closes operations automatically?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +2

      Hi, to make it work you need to translate it into mql5 language but you probably don't need to you can just run it straight from python, just needs a bit more coding lines, I will get the next video ready about live trading this strategy.

  • @linasadas
    @linasadas 7 місяців тому +1

    Excuse me, WE only 44 proc? Did I understand you correctly? Profit was made only from money management?

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      Money management is very simple in this video, there are better ways to do it.

  • @lecerclecrypto
    @lecerclecrypto Місяць тому +1

    I am not sure to understand but your average trade is around 0, that's means the fees or spread will cost you more and then the upward equity curve will be a negative curve in reality. Correct me if I missed something ?

    • @CodeTradingCafe
      @CodeTradingCafe  Місяць тому +1

      Depending on the fees amount per trade, but yes in general such scalping systems can be affected by fees because the take profit distances are usually short so not much is made per trade.

  • @CptnYarface
    @CptnYarface 3 місяці тому +1

    Great video! I'm also going through your Udemy courses as well. Love them! I do have a question on this video though. What is meant by "MySize=3000" and "Margin=1/30"? Are we assuming each trade is 3000 units (dollars, in this case) and the we're leveraging at 30:1?

    • @CodeTradingCafe
      @CodeTradingCafe  3 місяці тому +1

      Hi thank you for your support. Yes size is 3000 units so it's 0.03 equivalent in MT4 and the leverage is 30:1.

  • @jaydy71
    @jaydy71 4 місяці тому +1

    It's interesting to see how you could get a relatively simple rule-based strategy like this to actually work. Personally I was never successful with that, well at least not in a way that would also make back trading fees. But admittedly I wasn't as rigorous as you when I first tried something like this (and I didn't know much at all about trading, so that didn't help either).
    I only started to get profitable results when I started applying machine learning (and started to learn more about trading as I went along). I already had some years of experience with machine learning under my belt (but in very different domains), but I have to say even with that experience it took me a lot of experimentation to get it to work to an acceptable agree with trading.
    It's perhaps the most difficult and counter-intuitive problem I ever worked on. But that makes it so interesting too :)

    • @CodeTradingCafe
      @CodeTradingCafe  4 місяці тому

      I totally agree (and I also say the same) it's probably the most challenging problem I have ever worked on (after modelling ions collisions using Born theory and monte-carlo sampling lol).
      For me simple conditions strategies worked much better than Machine Learning, and they are faster to implement.

    • @jaydy71
      @jaydy71 4 місяці тому +1

      @@CodeTradingCafe That's very interesting, I should probably give rule-based strategies a second chance. Much easier to test :)
      My own work experiences in ML are in the fields of NLP and currently predictive maintenance of machinery. Doing a bit of hobby stuff on the side in the field of audio/DSP.
      Anyway, keep up the good work, I'm learning a lot on your channel!

    • @CodeTradingCafe
      @CodeTradingCafe  4 місяці тому

      Nice! NLP is a good niche as well, now booming after GPT and Co. :)

  • @deniszhuravlev9874
    @deniszhuravlev9874 7 місяців тому

    Interesting idea. I'd like to change BolingerBands on levels of support and resistance.
    Also you can try to add pyramiding function.

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      I agree for support resistance, it's worth a go, pyramiding is scary I would only try it for fun on a paper account.

  • @boamahmarcus4002
    @boamahmarcus4002 2 місяці тому +1

    It would be interesting to see it performance in live trading

    • @CodeTradingCafe
      @CodeTradingCafe  2 місяці тому

      I deployed it here : ua-cam.com/video/bZhtvvFm17A/v-deo.html
      and a quick recap of the results : ua-cam.com/video/buLNFOvHK8o/v-deo.html

  • @serraanindhita
    @serraanindhita 8 місяців тому +1

    useful content! thankyou i am still learning in the Nusantara fx community

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Happy this content is of help! thank you for your support.

  • @sheilanfc
    @sheilanfc 7 місяців тому +1

    useful content! thankyou i am still learning in the Nusantara fx community class

  • @rezasadeghi2520
    @rezasadeghi2520 8 місяців тому +1

    would be very interesting to see, specially when spread is considered.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Yes, the problem is that spread will mess up our ratios that we've already optimized in terms of SL and TP distances, this is highly challenging on low timeframes.

  • @bigbeurs
    @bigbeurs 5 місяців тому +1

    what are the setiings from the ema's?

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

      30 and 50 in lengths, but you can change these in the code if desired.

  • @williamlacerra1835
    @williamlacerra1835 6 місяців тому +1

    Hi, very nice work, I'm testing it with other currency, but where i can find your backtesting package? To test it your full metrics?

    • @CodeTradingCafe
      @CodeTradingCafe  6 місяців тому +1

      hi, you can install it from the notebook using the following command "!pip install backtesting"

    • @williamlacerra1835
      @williamlacerra1835 6 місяців тому

      @@CodeTradingCafe thank you!

    • @williamlacerra1835
      @williamlacerra1835 6 місяців тому +1

      Thank you for the help! I would like to suggest to you or maybe It's on the Channel already, a video on a multitimeframe analysis. I'm trying to dò something with multi timeframe signals. Did you have amy tips for me?

    • @CodeTradingCafe
      @CodeTradingCafe  6 місяців тому +1

      Hi, it's easy on live trading, a bit more tricky on a csv dataset because you need to synchronize both timeframes data.

  • @discordmember-f3g
    @discordmember-f3g 8 місяців тому +2

    Would be great to see it live on Interactive Broker paper account

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Thank you for your support, it has to be further optimized for live trading considering spread... will get back when it's ready.

  • @man6299
    @man6299 8 місяців тому +1

    How to apply this code to live trading? Please explain

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Hi, there's an example how to connect with a broker here: ua-cam.com/video/WcfKaZL4vpA/v-deo.html
      But it requires some coding skills. Good luck!

  • @deekay2091
    @deekay2091 8 місяців тому +1

    Very nice explanation.
    Do you build a dashboard of some sorts to track different signals and strategies over time? Any recommendation of a framework to use?
    I find using notebooks great for demos but am looking to build something to keep it all together.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Hi, thank you for your support. I don't keep all signals in a log, only the most performing which are very few, so far support/resistance, rejection candles are the best predictors, and the most important is the time-frame I find daily time frame the most reliable but too slow, so too much waiting for an opportunity.

  • @psychokarken
    @psychokarken 8 місяців тому +1

    Very insightful your videos! Thank you !!! Maybe I very dumb question.. What would be the actual used case benefit of coding this in python.. rather than using trading view?
    I am fairly new to all of this.. thank you a lot :-)

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      Hi, thank you for your support! Python mainly for 2 reasons, because I already code in Python it's my daytime job and you have access to Machine learning and advanced AI libraries like computer vision and neural networks... so you lack nothing working in python. But of course you can still do a lot using other codes and platforms.

  • @YoYo21688
    @YoYo21688 8 місяців тому +1

    How u get data from? Is it work for stock or future?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Hi, yes it works but needs tuning, the data is from YFinance and Dukascopy, brokers also provide data.

  • @ShardulPrabhu
    @ShardulPrabhu 8 місяців тому +1

    Any way to use regression trend channels ?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      In this particular one I didn't think of it, but I included regression channels in previous videos: ua-cam.com/video/Hpqptc5mWW8/v-deo.html

  • @arinnfc
    @arinnfc 8 місяців тому +1

    on youtube NFC there is a discussion about scalping, and indeed the advantages of this trading style are very profitable

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Thank you for the heads up, if you have a youtube link for the video it would be good to see.

  • @Theprofessor-iy5uo
    @Theprofessor-iy5uo 5 місяців тому +1

    I love what you are doing sir... Anyone wanting to automate their strategy can inbox me too..

  • @Time_Well_Spent7
    @Time_Well_Spent7 7 місяців тому +1

    from where u dowloaded csv which website ?

  • @russnagel1
    @russnagel1 7 місяців тому

    Liked. Subscribed. I would love to learn how to run a strategy live in real time. Some way to get alerts would be great as well.

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      Thank you for your support check this video on live signals from python: ua-cam.com/video/YYJ6iRXSy6Y/v-deo.html

  • @samilawsy7845
    @samilawsy7845 6 місяців тому +1

    Thanks its work . But rsi i think work with 5 period to buy from lower under 50 or 30 .

  • @jroche1832
    @jroche1832 7 місяців тому +1

    Why wouldn't you trade anything above 10% for Max Drawdown [%]? Is there a period you would trade higher? I have a very profitable algo but its max drawdown is around 20%

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      I find it risky, 20% is a lot but that's just experience opinion there are always exceptions. But good to know that it's working for you maybe I will give some algos their chance now :)

    • @jroche1832
      @jroche1832 7 місяців тому

      @@CodeTradingCafe Thanks for the note. It has a compound 177% return over 15 years with 72% win rate. Avg DD is 4% so I'm pretty happy with that. Paper trading it now

    • @jroche1832
      @jroche1832 7 місяців тому

      @@CodeTradingCafe on another note, is there a way to use self._broker._cash to vary your investment amount over time for example 50% if below an EMA?

    • @jroche1832
      @jroche1832 7 місяців тому

      I tried:
      if self.data.EMA[-1] > self.data.Close[-1]:
      self._broker._cash = self._broker._cash/2
      but that under performs significant;y

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      If you meant to change the lot size depending on your equity, anything below 1 in backtesting is considered a percentage of the total equity, so lot size 0.5 is 50%, and any value above 1 is a fixed lot size for example 1000 is 0.01 lot. check it out.

  • @corneliusluka3555
    @corneliusluka3555 6 місяців тому

    Thanks you Sir, Is it candle close or high is the algorithm reading price movement?

    • @CodeTradingCafe
      @CodeTradingCafe  6 місяців тому

      for now it's candle close, but you can modify it if needed.

  • @darnelljohn7077
    @darnelljohn7077 8 місяців тому +1

    have you ever tried implementing q learning algo?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Hi, I am not aware of it, never tried it.

  • @borundas1625
    @borundas1625 6 місяців тому +1

    sir how to do this in option trading

    • @CodeTradingCafe
      @CodeTradingCafe  6 місяців тому

      At the moment I haven't developed any solutions for options, but you can try and modify the code if needed.

  • @leandrogoethals6599
    @leandrogoethals6599 8 місяців тому +1

    Hey another great vid man keep it up! :)
    Is there a reason u always work with ohlc data in format(Gmt time,Open,High,Low,Close,Volume) instead of the ask/bid prices(Timestamp,Bid,Ask,Volume)?
    And why with GMT and not UTC?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Thank you for your support. No particular reason I just have the data in this format and kept using it over time, but your idea about bid ask volume is good but might require more computation time since the data size in this case is much larger.

    • @leandrogoethals6599
      @leandrogoethals6599 8 місяців тому +1

      @@CodeTradingCafe so iv gathered tick data from 1 jan 2020 till 1 jan 2024 and it took me 1 day with my internet(however i needed to do this only once)
      and yes i didn't pay for this i just did this per week since this was the free plans limit hihi :)
      However to compute the whole bid/ask with strategies it does take like 30mins on my i7-9850 4GHz overclocked then i made a script to read the csv and convert it to OHLC 5 mins candles, it is more inaccurate and sometimes late/early in the trades but only took 1-5 mins.
      So yeah i think we should do both first the quick testing on the candles then the long testing the ticks.
      Will u ever make a video with streaming api instead of restfull api live trading?
      Keep up the good vids :)

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Hi, good to know thank you for sharing. Regarding streaming API to be honest I am not intending to develop this now, mainly because the strategies I am using don't really need a stream API, my real trading style is even slower I am usually on the 4H and Daily timeframes I am very far from ticks and minutes data.

  • @AZG324
    @AZG324 8 місяців тому +1

    what broker were you using for API?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      I used Oanda in the past, both Oanda and IB offer easy API

  • @j1223aw
    @j1223aw 8 місяців тому

    Would love to see it on a thinkorswim paper account. Great Video Thanks

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Great suggestion! although it makes me nervous every time I test a strategy live.

  • @jacoritter
    @jacoritter 8 місяців тому +1

    Can u advise which EMAs u using

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      In this video It think 50 and 30 EMAs that's for slow and fast.

  • @TheGamerTeo
    @TheGamerTeo 7 місяців тому +1

    This is thoughtful, however the algorithm doesn't take into acount the spreads or transaction costs, these will cause a net loss.

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      Hi, true, but I still expect it to keep some returns, I am testing it live now, check tomorrow's video I will show the live code and preliminary live results.

  • @preetipics
    @preetipics 8 місяців тому +1

    thanks as always., This one looks really useful.

  • @akilahmedmd.1724
    @akilahmedmd.1724 8 місяців тому +1

    will there be any spread problem ???

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Yes and no... yes because it will mess up our ratios of SL and TP by a bit, but this can be corrected I am testing it live now will take some time before publishing.

  • @abdulshaikh3465
    @abdulshaikh3465 5 місяців тому +1

    ❤❤❤❤ for sharing the code.

  • @dencp1962
    @dencp1962 7 місяців тому +1

    Is this strategy viable with commissions?

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      I am testing it live now, some weeks are good some are not we just have to wait couple of months I guess. ua-cam.com/video/bZhtvvFm17A/v-deo.html

  • @Ayla1777
    @Ayla1777 8 місяців тому +1

    Great work, Can we have a zoom call to discuss this? Thanks

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Thank you, unfortunately unable to live call lots of ideas and requests. ping me an idea in here and I will do my best to put it somewhere in a code.

    • @blockchain-builders
      @blockchain-builders 8 місяців тому

      I had done similar strategy in pine and was performing great on SPX, Ive optimised it a bit more and now its making good return on 5 min SPX ( around ~120% with 9% DD using 50X leverage ) . I've included comission fee, slipage & margin , I may need to put swap fee as well ( pine doesn't take that input) . I went through your workbook and I guess there are many things to consider there, I be willing to work with you to improve it if you are interested.

    • @blockchain-builders
      @blockchain-builders 8 місяців тому +1

      @@CodeTradingCafe, Great share, Thank you so much for walk through, ideas and code. I run your workbook but I didn't see 200% return on 3 months , I saw 45% return over 4 years ... please advise

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Hi, thank you for sharing your results, I think returns depend on different parameter and mostly also the margin, I don't know what were the exact numbers.

  • @lorenslobo7403
    @lorenslobo7403 8 місяців тому

    running it on a simulated live account would be a bomb !
    also, I want to ask, can you do a video on RSI Divergence ? It will be interesting to see how you will implement the divergence (its quiet hard)

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому +1

      Hi, I have tried divergence .. not that hard :) it was a while ago maybe we should revisit : ua-cam.com/video/3d5RTto5fKY/v-deo.html

    • @lorenslobo7403
      @lorenslobo7403 7 місяців тому

      You are a beast@@CodeTradingCafe

  • @1play2fun
    @1play2fun 6 місяців тому +1

    Very interesting

    • @CodeTradingCafe
      @CodeTradingCafe  6 місяців тому

      Glad you think so! Thank you for your support.

  • @muhireinnocent2371
    @muhireinnocent2371 6 місяців тому

    when i EURUSD M5 data from Meta quotes and i run the code , without changing anything i get a return of 10% and maximum drawdown of -6% what's causing this difference . the data is from 2023/06/06 to 2024/02/29

    • @CodeTradingCafe
      @CodeTradingCafe  6 місяців тому

      Hi, not sure, hard to guess, might be the data or the time slice you're testing, and maybe parameters in the code.

  • @WasimZayed
    @WasimZayed 8 місяців тому +1

    I don`t know what you are using! but this Bollinger band you draw dose not look like any Bollinger I used before !

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      Hi, it'a bit narrower I used 1.5 standard deviation instead of the usual 2

  • @bombasticiti
    @bombasticiti 8 місяців тому +1

    Might try it out ...

  • @heenakowsar4538
    @heenakowsar4538 7 місяців тому +1

    Hi how to istall this stratergy into live account ?

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      Open oanda account, learn basic python install python, and link this code to your account, if you have never done coding before it's a month of evening hours side hustle. Good luck!

    • @heenakowsar4538
      @heenakowsar4538 7 місяців тому

      I'm from india I cannot open account through this broker what to do now ?@@CodeTradingCafe

    • @heenakowsar4538
      @heenakowsar4538 7 місяців тому

      Any other API supporting platforms for india which supports API ? please let me know i use exness @@CodeTradingCafe

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому

      Hi, I know Interactive Brokers they have an API, and Binance as well.

  • @bhavyamehra6931
    @bhavyamehra6931 8 місяців тому

    Lets try a live version. Should be good for some validation and further tuning

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      further tuning for sure. Thank you for your comment.

  • @leadingworld
    @leadingworld 8 місяців тому

    Is it back tested on specific assets?
    What assets do you think will be the best for this strategy?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Good question, honestly I didn't test it on different assets but I should. For now I am testing it live... a glimpse on the results, every morning it's up by around +5% profit (which is huge) for some reason it drops down to +0.5% during New York session, trying to figure it out.

  • @ndanielamaha5618
    @ndanielamaha5618 8 місяців тому +1

    Would this work on crypto?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Hi, yes it should work but of course you need to optimize few parameters first to get it working well.

  • @aarondelarosa3146
    @aarondelarosa3146 6 місяців тому +1

    Excellent. Can you share the database?

    • @CodeTradingCafe
      @CodeTradingCafe  6 місяців тому +1

      Hi, thank you, the data is in a link from the description.

    • @aarondelarosa3146
      @aarondelarosa3146 6 місяців тому +1

      How do you get database?@@CodeTradingCafe

    • @CodeTradingCafe
      @CodeTradingCafe  6 місяців тому

      Dukascopy is my source for this file.

  • @akandesoji3580
    @akandesoji3580 8 місяців тому

    Please make it be live
    And please teach us how to code price action strategy or breakout strategy

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Hi, thank you for your comment. I have many videos on break out:
      ua-cam.com/video/HClxCVvfXDM/v-deo.html
      ua-cam.com/video/Hpqptc5mWW8/v-deo.html
      ua-cam.com/video/oyuyeYi_7rw/v-deo.html

  • @liakella
    @liakella 8 місяців тому +1

    Thank you for explanation

  • @JustThink-cg4px
    @JustThink-cg4px 2 місяці тому

    Something wrong in that code because in the first rows the EMA direction is equal to zero, However the signal values is equal to 1 (sell signal)
    The signal should be 1 or 2 only if the ema direction is not equal zero

    • @CodeTradingCafe
      @CodeTradingCafe  2 місяці тому

      Hi I verified this using : df[(df.TotalSignal !=0) & (df.EMASignal == 0)]
      and got no false signals. Did you modify anything in the code? check from your side if there is something you have missed.

    • @JustThink-cg4px
      @JustThink-cg4px 2 місяці тому

      @@CodeTradingCafe thank you for your reply, will check in my side

  • @PrayalankarSharma
    @PrayalankarSharma 8 місяців тому

    yes! we would like to see it on paper trade account.

  • @wftrdshometoprofessionalfo142
    @wftrdshometoprofessionalfo142 8 місяців тому

    Please try it on paper or live trading condition. Most appreciated

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Will do but have to apply some tuning for live trading first.

  • @usunyu
    @usunyu 8 місяців тому +1

    Great content, looking forward how it perform on paper account

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Me too! I will need to tune it for spread and try to increase the profit.

  • @PeterPankowski
    @PeterPankowski 6 місяців тому

    Excellent stuff!🥰😍🤩

  • @sadikelouahabi398
    @sadikelouahabi398 8 місяців тому

    Thank you very much.
    Could you please do it in on live trading paper account. Thanks again.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Will do soon, needs a bit of tuning first.

  • @Nachhitoo
    @Nachhitoo 8 місяців тому

    HOLA COMO PEGO EL BOT EN MI METATRAIDER PARA PODERR USARLO YO?
    GRASIAS

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Hi, this doesn't work in Metatrader only in Python.

  • @marcosunt1206
    @marcosunt1206 8 місяців тому +1

    Is there a solution for the 2 weeks leading to that -16% drawdown ? Loving your video bro!! Thanks

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Thank you for your support. Not sure drawdown can be avoided in any form of trading, we just have to manage losses when it happens.

  • @abdouseck4894
    @abdouseck4894 24 дні тому

    did you try any of those bots live yet?

  • @MisterPDR
    @MisterPDR 8 місяців тому +1

    the problem is that the average trade does not stand slippage and commission. but give it a try!

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      True! it might need tuning again on live data considering at least the spread.

    • @MisterPDR
      @MisterPDR 8 місяців тому +1

      @@CodeTradingCafe why not increase the timeframe to increase average trade?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      That's a good idea, I always traded 4H and Daily, I am just including 5 min as a variation for the YT channel, but daily timeframe is still my favorite.

  • @ShardulPrabhu
    @ShardulPrabhu 8 місяців тому +1

    We want it on live

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      Thanks, we all do! it's challenging with the spread need to optimize it first.

  • @fxsurgeon1
    @fxsurgeon1 6 місяців тому +1

    Overfitted somehow, no trading costs included? Doesn't work on MT5, it's a losing strategy.

    • @CodeTradingCafe
      @CodeTradingCafe  6 місяців тому

      it doesn't have to work on MT5, deployed it live just using python, running smooth and never needed MT.

  • @Nachhitoo
    @Nachhitoo 8 місяців тому +1

    THENKIU

  • @Larussiecestlavie
    @Larussiecestlavie 8 місяців тому +24

    Life is good without trading fees 😅😅

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +12

      Well the strategy has to work without fees first, then we can add fees to see if it still works, if not we can adjust a thing or 2, fees are different depending on type of account and broker. But I am trying to test it live now.

    • @sanchaykasturey5334
      @sanchaykasturey5334 7 місяців тому

      ​@@CodeTradingCafe😂😂

    • @msmly
      @msmly 24 дні тому

      @@CodeTradingCafe Do you tested it?

  • @pradeepbirajdar7334
    @pradeepbirajdar7334 8 місяців тому +1

    Live testing on paper trading

  • @dcchase8225
    @dcchase8225 8 місяців тому +1

    Excellent

  • @amritwt
    @amritwt 8 місяців тому

    dope content, what does your portfolio/trading journal look like?

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Thank you! my portfolio not very impressive I trade slowly because I work during the day, so I have a very little number of trades per month, it's fun though.

    • @jackfrosterton2530
      @jackfrosterton2530 8 місяців тому

      @@CodeTradingCafe
      "I trade slowly because I work during the day"
      Since you have an entire channel dedicated to automated trading, have you considered automated trading?

  • @AnmWorshipSong
    @AnmWorshipSong 8 місяців тому +1

    CAN U APPLY THIS STRATEGY TO EXNESS OR IC MARKET MT5 DEMO ACOUNT
    USING MT5 PYTHON API
    BCZ LOT OF PEOPLE USE IC MARKET AND EXNESS AND THESE ARE TRUSTED BROKER
    WE WILL WAIT FOR THIS VIDEO

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      I have to check their API first hopefully it's possible through python

    • @AnmWorshipSong
      @AnmWorshipSong 8 місяців тому

      sir there is free metatrader 5 api is avaialble and it can work any broker
      @@CodeTradingCafe

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      Hi, thank you I will check it out for a video

  • @damventa
    @damventa 8 місяців тому +1

    Live test

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      Next time... or the one after, the test takes time to run and see some results.

  • @autonate_ai
    @autonate_ai 8 місяців тому

    This is dope!

  • @guillermoochoadeaspuru625
    @guillermoochoadeaspuru625 6 місяців тому +1

    In my opinion, this backtest is not representative of the validity of the strategy. This is a trend-following stragegy, and you backtested it only over three months when the market was mostly trending downward. So, no surprise that if you test a trend-following strategy on a trending market, the strategy will come out as profitable. However, if you use this strategy live, you will pour money down the drain when the market goes sideways. It is not a good strategy, in my opinion.

    • @CodeTradingCafe
      @CodeTradingCafe  6 місяців тому

      I guess like you said it works in some conditions, I need to find a way so it skips trading ranging market. At the end the market is either ranging or trending (or both 😅).

  • @poisonza
    @poisonza 8 місяців тому +1

    Slippage and commission ... 😢

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Yes sorry about this, but these are not the main issue, it's mainly how the spread messes up the SL TP ratios that we already optimized here, so the values should be modified considering the spread as well, I am testing this live now, I have to wait ... fine tune then test again, I will share it when it's done. (trading daily timeframe is much easier!)

  • @pranjalchaubey
    @pranjalchaubey 2 місяці тому +1

    Loss making strategy as soon as you enter exchange trading fee and slippage.

    • @CodeTradingCafe
      @CodeTradingCafe  2 місяці тому +1

      Yes the curse of low timeframes is this, high trading frequency hence high fees... But if shows potential on lower timeframes maybe it's wprth scaling to higher TF.

  • @anstotafarachibamu9889
    @anstotafarachibamu9889 8 місяців тому +2

    Looks great but at this point it’s not realistic. Incorporate trading costs

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      True, but this is the way I test indicators checking just their potential. However for the full strategy it needs to be optimized with fees and spread on.

  • @AkVertasium232
    @AkVertasium232 8 місяців тому

    bro ur using 1/30 levrage the the roi is must good make strategy to trade 100 % capital

    • @abdsh422
      @abdsh422 8 місяців тому +1

      Why100% part of being good is to control your risk reward 1/30 is good and will give a good return

    • @AkVertasium232
      @AkVertasium232 8 місяців тому

      @@abdsh422 bro I didn't understand is he uses 1/30 th of capital per trade or taking 30×. On capital leverage to trade market just please explain me

    • @abdsh422
      @abdsh422 8 місяців тому +1

      I believe I may have misunderstood your comment earlier. Regarding your question, a 1:30 leverage was utilized in the backtest (which is represented as 1/30 in the code). As for the 30000, it represents the lot size.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому +1

      Hi, the lot size is 3000, if I trade with 100% capital returns will be very high but the risk as well.

    • @AkVertasium232
      @AkVertasium232 8 місяців тому

      @@CodeTradingCafe thank you for making this content 🙏

  • @munivoltarc
    @munivoltarc 7 місяців тому

    I don't understand why majority youtubers post moving averages or any other price lagging indicators in their code, every experienced traders know it is waste of time and money to use price lagging indicators, only scammers promote moving averages on internet to use to steal money from poor novice traders, use price action instead if you people are honest to teach your skill to viewers. Don't cheat them

    • @CodeTradingCafe
      @CodeTradingCafe  7 місяців тому +2

      so price action is not a lagging indicator?

    • @ashishsuvarna3511
      @ashishsuvarna3511 3 місяці тому

      @muni - why don't you suggest a good strategy then? I assume you might know the next price that will display on the chart before it's plot on the chart

    • @munivoltarc
      @munivoltarc 3 місяці тому

      @@ashishsuvarna3511 if I would be right in forecasting the exact price, you would not comment me at all, friend don't ever take any ones comment personal or egoistic, think about that the benefit of the comment.

    • @munivoltarc
      @munivoltarc 3 місяці тому

      @@CodeTradingCafe it is better than other indicators

    • @neuromencer0000
      @neuromencer0000 3 місяці тому

      ​@@munivoltarcI was watching this video, and read your comment with some expectations of suggesting some other indicators or better angle. What you basically want to say is moving everage is old and duping viewers, but you don't know what would be better strategy and anybody who ask your opinion is oversensitive. What a loser.

  • @polmaksim
    @polmaksim 8 місяців тому

    As soon as you add trading fees to backtest, you start loosing money.

    • @CodeTradingCafe
      @CodeTradingCafe  8 місяців тому

      Hi thank you, how much fees you added?

    • @polmaksim
      @polmaksim 8 місяців тому

      @@CodeTradingCafe Hey. I have added default Binance fee for Futures: 0.04% per trade. To make profit, you should have not more than 0.01% fees, which is VIP2 or VIP3 level, not for all I guess 🙂