Find Upper and Lower Trend Lines with MQL

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

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

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

    To me, this is the most valuable video in the Orchard treasure chest.
    Given that I am still a novice, this was indeed a handful. Nevertheless, I am going to go over this multiple times till I figure out the essence and make one for myself.
    Thank you so much. The fact that you continue to churn out content so regularly is amazing.
    God bless you my good sir. You are amazing.
    I am so grateful for your videos.

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

    This is a very advanced concept, both from the view point of good trading and coding. Thank you for presenting it in an easy-to-understand way and sharing your code!

  • @maciha7938
    @maciha7938 7 месяцев назад

    the best word for this video is "Thanks"❤❤❤❤❤❤❤❤

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

    Is possible to make an bot that looks for lowers lows and highs higher in which it look for last up close candle(green candle) in high higher and for lower low last down close candle. Look for a break above in bullish case and break below in bearish case. When it retraces to that down last close candle or up close candle automatically buys and also set a stop loss at the very top of the candle. If so how would you go about doing this in mt4.

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

    Thanks a lot for sharing your knowledge and time!

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

    Thank you for sharing this very valuable

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

    Very good! You explain very well! Thanks a lot.

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

    Excellent stuff..Learned a lot from your videos....Thank you very much

  • @samsam-dx9xq
    @samsam-dx9xq 2 месяца назад

    Thank you so much

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

    hello I'm new and learning a lot from your videos, so THANK YOU.
    I have a question.
    I would like to transfer this info to a graph with a lower TF, precisely to identify trend reversals.
    I should therefore extract, in addition to the maximum and minimum value a, that the moment (day, hour) to transfer it precisely to another graph through the global variables.
    could you help me ?

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

    Hi Arthur, another very interesting topic explained in the simplest way. Each of your tutorials takes my programming at least one level up. Thanks a lot for sharing your knowledge. Just a pointer, while calculating mid bar in LowerTrend() you used "int midBar = mStart + (mLength/2);" while in UpperTrend it is
    "int midBar = mStart + ((mLength+1)/2);". Is it a typo or do you intend so? To me, it seems the addition of zero Bar, and should be the same in both methods.

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

      It's a typing error. Both should be the same, there is very little difference between them, just where the midpoint lies.

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

    Thinking outside the box here...
    Could one modify this to instead look for the price midpoint over a given number of bars and then determine whether we're in a sideways Range based on Slope? I'm thinking along the lines of a custom indicator that boxes in Range bars based on Slope.

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

      Finding a midpoint is easy but slope alone should be enough to know if you are in a sideways range. There are other videos coming with different approaches to finding trend lines that may be more suited to this.

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

    Great video. now need to add the breakout to my EA strategy....

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

    Nice job Arthur! How to identify range from some candles, for example, from 5 or 6 ones? Find out Max and Min from that range?

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

      Use iHighest to get the number of the candle with the highest value and then iHigh to get the high price. Then the same for iLowest and iLow.

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

      @@OrchardForex Thanks a lot, Arthur!

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

    I would find this extremely useful in my day to day trading. Thank you for your insight. Just one thing, when calculating the slope would it be useful to use the daily pivot as guide to ascertain whether the slope is too severe or not?

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

      You can always use different timeframes to get confirmation of a trend. When I referred to pivot I was talking about it in the sense of a rotation point, not pivots as defined in financial terms based on daily price movements.

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

    There is a small discrepancy between lines 93 and 145 of " (mLength/2) vs ((mLength+1)/2) ", is this intentional? I haven't sufficiently dissected the code yet to see if causes a significant issue since it appears that it may only be a small difference. I would think it would affect smaller ranges with fewer bars more.?

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

      I hadn't noticed that. It is a typing error, both should be the same. It doesn't really matter which, the statements are just to get a mid point.

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

    with mql4\ how to get previous buffer Value ?? to make a comparison between last arrow and previous arrow for the same buffer - please help

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

      Previous value in any buffer is just index+1;

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

      @@OrchardForex if i have arrow with buffer[i] and want the last previous arrow with buffer so i try call buffer[i+1] but it return the value from the previous candle not buffer???

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

    Great information... I just joined your Premium Membership and so far I am loving it.. Question: Have you tried programming stock robots..especially like using Python... Did you find that way more difficult or not as rewarding... would love to hear your positive and negative things about doing the same for Stock as you do for Forex.. Thanks

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

      Long ago I wrote some trading software for stocks but I find individual stocks too unpredictable. I do trade indices now because the noise is filtered out there. I don't like python. Hard to explain but the idea of just using indentation for blocks seems wrong, and I've had some spectacular problems caused by that following cut and paste. I prefer node, been around for a while but I don't need to jump from one new thing to the next. For compiled languages C# or Java.

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

    I have copied the same code exactly as you, no errors but it the trends are not showing on the chart, neither is the printFormat, when I try to run on backtest it just gets stuck, could this be an infinite loop? Please help

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

      There are loops but I cannot see where they would become infinite loops. My copy of the code is working without problems. This code is a script and will not run in backtest.

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

    Thank you so much for another amazing tutorial! I receive the error "Abnormal termination" on experts window. Can you help me fix it, please?

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

      It will be the messages before that that are important

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

      @@OrchardForex, it was my mistake, I am sorry. I had a space in mUpperTrend calling. Thank you for you tutorial and reply!

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

    Thanks for the great video. your videos are all very helpful.
    May I ask, why was CTrendiLo inherited from CObject? you didn't use it.
    More importantly, can you please make a video in which you demonstrate CObject?
    It would be perfect if you could explain why exactly pointers are used (generally, not only in CObject)
    Thanks again

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

      I didn't use it here but if I want to use the class later, say storing in an array of type CArrayObj then it must be inherited from CObject.

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

      @@OrchardForex thank you

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

    Excellent video Arthur, thank you very much!
    I've followed along to build both mqh and mq4 files as you've outlined. But when I add the indicator to my chart, it is being auto removed with error: Expert 'TrendHiLo' is not custom indicator and will be removed. Is there a step I might be missing before the mqh file build?

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

      The functions can be used anywhere but the example code I used is a script, it won't run as an indicator.

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

      @@OrchardForex thank you, that's the piece I overlooked. I saved it in the Indicator folder instead of Script folder. Now it works. You're so great, thanks again!

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

    Hi can you pls tell where can i start learn MQL ? And is it possible to programme an EA for price action,market structures/ break and retest, basically where indicators are not required.

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

      I have no specific place for a structured MQL course but there are a lot of short pieces on youtube that may help. All of these types of EA are possible if you first fully define the rules and decisions.

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

    I found your videos very helpful especially with your excellent way to describe all the details. I tried this code, but it is stuck when testing without drawing any trend lines, and finally, I have to stop it. I copied exactly the same code as your video. Do you have any idea about this problem?

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

      The code in the examples was a script which would run once and terminate. If you had to stop it then you have an infinite lop somewhere. Check your while statements.

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

    This so awesome, thnk you again I'm learning so so much

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

      You are so welcome!

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

      @@OrchardForex Hey I coded along with you exactly yet my script only prints the upper trend line 😞I've just finished going through the video for the 8th time now looking for my mistake but I can't find it, where should I look to fix this?

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

      @@bookssums First right click the chart and show objects to see if the line is there and not visible. If it is there then you may have drawn it in the wrong place, possibly on top of the upper line. After that add print statements into the code where the lower line would be drawn to print out important values and make sure they are correct. it is likely just one or 2 incorrect values used.

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

      after following your first suggestion by changing the line colour in the show objects settings I realised that my lower line was being drawn at the upper position and that my upper line was not showing at all. will now add print statements to see if I can figure this out, thanks a mill

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

      @@OrchardForex Found the issue!! thank you very much 😀

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

    where i can find the code?

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

    Hello can you teach us how to draw trendlines using zigzag indicator to find highs and lows

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

      ruclips.net/video/joawpfmIv6Y/видео.html

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

    Hi Arthur, can you suggest how to get the angle value from OBJ_TRENDBYANGLE? I am able to draw the line, but could not figure out how to get angle value. Thanks in advance.

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

      Have you tried OBJPROP_ANGLE

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

      @@OrchardForex I will give it a try. Thanks for your suggestion. :)

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

    is this coding working on mql4

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

    Hi, i liked so much this video, i will try in my robot, i could't download the code in the discord

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

    Please can u turn my Indicators into ea plz

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

    Can I use your voice in an AI? Can I insert it into Kylo Ren's helmet? very cool lol

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

      I haven't finished using it myself yet.