MQL4 Programming - Page 2
Page 2 of 509 FirstFirst 1234 ... LastLast
Results 11 to 20 of 87

Thread: MQL4 Programming

  1. #11
    In this movie I try to execute bits of specific trading egy from here http://forextradingegies4u.com/20-sm...x-trading-egy/.
    The egy is related to Simple Moving Average and Candle price.
    In this movie I also show you how to make an if else condition announcement in order to define a downtrend or a uptrend according the egy over.



    Inserted Code // ------------------------------------------------------------------ //| Tutorial2.mq4 | //| Copyright 2017, MetaQuotes Software Corp.. | //| https://www.mql5.com | // ------------------------------------------------------------------ #property copyright Copyright 2017, MetaQuotes Software Corp. #property Hyperlink https://www.mql5.com #property variant 1.00 #property strict #property indior_chart_window // ------------------------------------------------------------------ //| Custom indior initialization function | // ------------------------------------------------------------------ int OnInit() //-- indior buffers mapping Print(Tutorial 2 initialized); //-- return(INIT_SUCCEEDED); // ------------------------------------------------------------------ //| Custom indior iteration serve | // ------------------------------------------------------------------ int OnCalculate(const int rates_total, const int prev_calculated, const datetime time#91;#93;, const double open#91;#93;, const double top#91;#93;, const double non#91;#93;, const double close#91;#93;, const long tick_volume#91;#93;, const long volume#91;#93;, const int spread#91;#93;-RRB- //-- //The price data type is DOUBLE double candleClose=iClose(Symbol(),PERIOD_CURRENT,0); dual sma=iMA(Symbol(),PERIOD_CURRENT,20,0,MODE_SMA,PRIC E_CLOSE,0); Print(sma = ,sma); Print(candleClose = ,candleClose); should(candleCloselt;sma)//Downtrend condition Print(downtrend); else if(candleClosegt;sma)//Uptrend condition Print(uptrend); //-- return value of prev_calculated for next call yield(rates_total); // ------------------------------------------------------------------

  2. #12
    Quote Originally Posted by ;
    In this video I try to implement bits of specific trading egy from here http://forextradingegies4u.com/20-sm...x-trading-egy/. The egy is connected to Simple Moving Average and price. Create a certain condition to specify a downtrend or an uptrend https://youtu.be/yp5rikdipTQ //p------------------------------------------------------------------ //| Tutorial2.mq4 | //| Copyright 2017, MetaQuotes Software Corp.. | //| https://www.mql5.com | // ------------------------------------------------------------------ ...
    simply to add more detail into this video

    Inserted Code if(candleCloselt;sma)//Downtrend condition Print(downtrend); else if(candleClosegt;sma)//Uptrend condition Print(uptrend);
    For more info regarding the If Else Condition Operator, please read this wonderful MQL4 reference record
    https://docs.mql4.com/basis/operators/if

  3. #13
    While Loop and For operator I instruct you in this video. This is quite important concept and most likely you can use this in of your program.



    https://docs.mql4.com/basis/operators/for

    Inserted Code // ------------------------------------------------------------------ //| Tutorial3.mq4 | //| Copyright 2017, MetaQuotes Software Corp.. | //| https://www.mql5.com | // ------------------------------------------------------------------ #property copyright Copyright 2017, MetaQuotes Software Corp. #property link https://www.mql5.com #property variant 1.00 #property strict // ------------------------------------------------------------------ //| Script software launch function | // ------------------------------------------------------------------ void OnStart() //-- Print(Symbol(), Bars = ,Bars); //For loop example for(int I =0;ilt;Bars;I ) if(I==5) Print(Open = ,Open#91;I#93;,, index = ,I); bool runLoop = true; int I=0; while(runLoop) I ; should(igt;=Bars) runLoop=false; Alert(THE END, at index , I); // ------------------------------------------------------------------

  4. #14
    In Another video I will teach you about VARIABLE, Also FUNCTION or METHOD

    Here you can have a head start:

    Variable
    https://book.mql4.com/variables/types

    Method/function
    https://docs.mql4.com/basis/function

    Until Today I've teach you the Fundamental only.
    Those are the mortar and brick which you then can use to make your own skyscraper.
    You want to learn the mortar and brick (be the master mason) until you make your pyramid.


  5. #15
    Quote Originally Posted by ;
    In this thread, I will teach you how to code or do some programming. I will use MQL4 for the programming language. . I will start place it here and make. I will try make it easy for you men.
    Thank you for this. I've been studying trading for a month or two, but have to perform a complete time job and have kids. Hopefully I can get my EA to work to me

  6. #16
    Quote Originally Posted by ;
    quote Thank You for this. Have kids also and I've been studying trading for a month or two, but need to perform a full time occupation. Hopefully I can get my own EA to function for me =D
    Sure friend!

    Yeah we need to pay some fundamental first before we go farther.

    I truly appreciate if you were able to begin get your hands dirty. You may let me know so I can help you if you're in problem with your code.

    Learn. Don't make my videos and effort become fruitless.

  7. #17
    unable to listen to voice obviously in movie...
    first step
    property
    what are in property. . Use for what to use, why it is . . Like explain means can understand more better ...
    next int init deinit... how are it'll be used... like that . .
    Next beginning function... like this will be great useful


  8. #18
    Since I would like to do one indior many are stated it is repaint and not do...
    but I would like to do that without repaint...
    so that I must learn coding... then only I could do that. .

  9. #19
    Quote Originally Posted by ;
    unable to hear voice obviously in video... first step land what are all in property. . Use for what to use, why it is . . Like explain means can comprehend even more better ... next int init deinit... how are all it will be used... like that . . Next beginning function... like this will be good helpful image image
    I have to emphasize here that it is very important to read through the documentation/API provided by MetaQuote or any programming language

    https://docs.mql4.com/basis/preprosessor/compilation lt;lt; there you will find info about property
    https://docs.mql4.com/basis/function/events and https://docs.mql4.com/runtime/event_fire#start lt;lt;Event handling, there you will discover beginning

  10. #20
    Quote Originally Posted by ;
    Struggling to listen to voice obviously in movie... first measure property what are in property. . Use for what to use, why it's . . Like describe means can understand even more better ... following int init deinit... how are it'll be used... like that . . Next beginning function... like this will be good helpful picture picture
    I will make a movie about property tomorrow.

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