Find Upper and Lower Trend Lines with MQL

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

КОМЕНТАРІ • 62

  • @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 2 роки тому +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 3 місяці тому

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

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

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

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

    Thanks a lot for sharing your knowledge and time!

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

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

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

    Thank you for sharing this very valuable

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

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

  • @anilvarma9893
    @anilvarma9893 2 роки тому +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  2 роки тому +1

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

  • @joshuagittens
    @joshuagittens 2 роки тому +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.

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

    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  2 роки тому +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.

  • @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 😀

  • @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!

  • @donbangert
    @donbangert 2 роки тому +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  2 роки тому +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.

  • @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 ?

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

    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  2 роки тому

      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.

  • @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 2 роки тому

    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  2 роки тому +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 2 роки тому

      @@OrchardForex thank you

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

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

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

      ua-cam.com/video/joawpfmIv6Y/v-deo.html

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

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

  • @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.

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

    where i can find the code?

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

    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  2 роки тому

      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.

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

    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  2 роки тому +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???

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

    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  2 роки тому +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.

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

    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  2 роки тому +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 2 роки тому

      @@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!

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

    Please can u turn my Indicators into ea plz

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

    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  2 роки тому +1

      Have you tried OBJPROP_ANGLE

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

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

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

    is this coding working on mql4