Learn New MQL Coding
Page 1 of 509 123 ... LastLast
Results 1 to 10 of 87

Thread: Learn New MQL Coding

  1. #1
    The most recent MQL 600 builds offers Object Oriented Programming (OOP) almost as some professional and more popular OOP languages such as C , C# (C Sharp) or even Java.

    As its name implies, OOP brings to us the capacity to use objects representing entities with their own logic and life length, like objects in real life.

    In the procedural Earth, you have separate and disparate data and functions that expose all of the implementation details and frequently tend to conceal the implementation logic or to make it hard to read.

    In OOP, implementation details are hidden from the objects themselves permitting the programmer to separate the program logic from the implementation details.

    As a C /C#/Java programmer with several years of experience I'm very happy to introduce you to those intriguing new concepts in the context of producing indiors or EAs.


    If you are interested or even new to programming, you are at the right location and Welcome.



    Contents:


    #9658; https://forexintuitive.com/forex-tra...ing-diary.html

    #9658; https://forexintuitive.com/discussio...form-saxo.html

    #9658; https://forexintuitive.com/discussio...1-usd-jpy.html#8203;

    #9658; https://forexintuitive.com/discussio...form-saxo.html

    #9658; https://forexintuitive.com/forex-tra...0-journal.html

    #9658; https://forexintuitive.com/forex-tra...es-market.html

    #9658; https://forexintuitive.com/forex-tra...a-trading.html
    .
    #9658; https://forexintuitive.com/discussio...tops-hurt.html
    .
    #9658; https://forexintuitive.com/discussio...x-trading.html

    #9658; https://forexintuitive.com/discussio...discovery.html

    #9658; From Visual Modelisation using FlowCharts to complete Object Oriented EAhttps://forexintuitive.com/forex-tra...e-journal.html

    #9658; Mindi Yost Trading Assistant EAhttps://forexintuitive.com/forex-tra...reen-pips.html

    #9658; Intro to Unit Testinghttps://forexintuitive.com/discussio...ion-pairs.html
    .
    #8226;#8226;#8226;
    .

  2. #2
    96246It looks great to me. The only other thing that I could think of at this stage is when I stated
    The aim of this system is to initiate AT LEAST 6 trades (or much more, and I have had it pick up as much as 20 in rare situations) and carry those trades for 100 or more pips profitably from the initial Target. As a result of this, adding Stop Loss isn't recommended on some of those trades. But I add Profit Stops AT THE ORIGINAL target to ALL profitable trades WHEN all the open positions are profitable. Currently I shall also add a Profit target for each one the trades too.

    Although, for the time being, the EA is primarily for entering the trades and the trader would control the Stops and Limits manually once the trades have been entered, I suppose I should tell you I also move the stops that were initiated at the above mentioned Bold text - as well as adding ceases (profit stops) to some residual trades once the LEAST PROFITABLE TRADE is 50 pips profitable. Now I protect 25 pips of profit on that least profitable trade and be certain every other trade has a minimum of at least 25 pips secure. But the trader can thus whatever they want at any stage with the stops - or near any/all of the trades when they are profitable. If we decide to fully automate this, we'll have to make some principles for profit protection, but I don't think it is an issue at present.

  3. #3
    91718I had a thought on this too, but it's no problem, we can put in the profit logic at a later moment.

  4. #4
    91718after what happened - did it become more apparent to you as to transactions stop or use buy transactions was sort of important?

  5. #5
    91718
    Quote Originally Posted by ;
    after what happened last night - did it become more apparent to you as to why the use stop trades or use buy trades only was kind of important?
    Euh no, enlighten me .

  6. #6
    91718well, the emails began at 9:55pm (my regional time) when the price first crossed over the target of 14760 - with the large at 14765. That was when I entered the limit transactions that are Sell beginning at 14770. The subsequent 4 1m bars with the low on those bars of 14741. The next 1m pub (10:00pm) broke over 14760 again (this is the very first re-test to move higher) with the high on those bars in 147648 (so essentially showing a double top that can be construed as a resistance). The subsequent 4 bars moved lower again. At 10:07pm we had another bar that broke over 14760 - but this time the large was14762 (a lesser high that indies the resistance is bolstering ) and this was also the 2nd failed test of trying to move greater. The next series of bars dropped below 14760 again - but this time that the low had been 14751 (a greater low - that gave me hope that the next up move would split the resistance at 14765). At 10:18 the price again broke over 14760 and after a few seconds hit on a high this period of 147685. So, what we had was a rally attempt to move higher - I was encouraged that it would meet my Limit orders. The price fell back again to 14750 - 3rd failed attempt. At 10:34pm there was a strong up move bar that went to a high of 147674 from a low of 14751. That pub is the one where I should have entered the Cease Orders - since on the strong bar you are aware that the price will just do 2 things - 1) move firmly to the upside - or two ) move strongly to the downside. I really only had about 10 seconds prior to the move took more than NOT enough time to put 5 Sell Stop orders until the price fell back under 14765. But - I possess the EA pop and would have had sufficient time with the EA open to click Stop trades just those before the price started falling. By 11:28 (less than an hour after ) the price was down to 14665 - 100 pips in where the highest of the market stop orders would have gone .

  7. #7
    91718 This is a screen shot of a series of gbp/nzd transactions that I simply closed from a demo account. I shut them early (before the take profit that I typically look for) because I've had enough fun for 1 night... The very best in the show closed for 112 pips, and the worst for 37 pips. However, as it happened , it did pick up all of the Sell Limit orders and each of the sell orders, so there were 10 trades. Total pips = 695 At one point I might have really put in 2 extra Sell Limit orders as the price went 20 pips higher than the pile of orders I had placed - but I wasn't paying attention and missed it. At a live account, there would most likely be a little bit of slippage hit and miss about the transaction entrances and exits - therefore the amounts wouldn't be nice and round and easy to read as in this example. ... .... Uhmm, I just realized I do not know how to join the jpeg file within this message platform - can not get it to glue in a clip board pic either... oh well, sorry you can not see it.


  8. #8
    91718oh... I guess it worked after all but I did not mean to article 2 of them... oh well.

  9. #9
    91718
    Quote Originally Posted by ;
    oh... I guess it worked after all - but I did not mean to article 2 of them... oh well.
    Impressive.

    From my side, I've the logic flowchart done. It looks good but I need to play with a little with it to see whether there aren't mistakes, then I will post it so that you can have a look at it and double check.

  10. #10
    917183 Structure (s) This is your logic, it appears fine but it's good if you double click it.

    The code will follow...






Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information