Page 5 of 509 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 87

Thread: MQL4 Programming

  1. #41
    Quote Originally Posted by ;
    okk understood... one more uncertainty. . #define FIB_SUP1 FIB_SUP_1 #define FIB_SUP2 FIB_SUP_2 #define FIB_SUP3 FIB_SUP_3 #define FIB_RES1 FIB_RES_1 #define FIB_RES2 FIB_RES_2 #define FIB_RES3 FIB_RES_3 what is the diff of this define and double double A , B , D, E, A1, B1, D1, E1 , A2, B2, D2, E2 ; why need to specify... instead of this DEFINE cant perform with double FIB_SUP1,FIB_SUP2 ,FIB_SUP3.... LIKE ? What will happen
    It is almost similar to continuous (fixed) variable where you can't alter the variable while the program run.

    Inserted Code #define FIB_SUP1 FIB_SUP_1 #define FIB_SUP2 FIB_SUP_2 #define FIB_SUP3 FIB_SUP_3 #define FIB_RES1 FIB_RES_1 #define FIB_RES2 FIB_RES_2 #define FIB_RES3 FIB_RES_3 In my experience personally the #FIB_SUP1 etc are fixed variable. But rather you produce a global/local variable and can delete those item.

  2. #42
    In this video I show you how to Incorporate moving averages into any oscilator


    Inserted Code //P------------------------------------------------------------------ //| cciMATutorial.mq4 | //| Copyright 2017, MetaQuotes Software Corp.. | //| https://www.mql5.com | // ------------------------------------------------------------------ #property copyright Copyright 2017, MetaQuotes Software Corp. #property Hyperlink https://www.mql5.com #property version 1.00 #property stringent #property indior_separate_window #property indior_buffers 3 #property indior_color1 clrBlack #property indior_color2 clrBlue #property indior_color3 clrRed input int oscilatorPeriod=20; //Oscilator Phase input int maPeriod=20; //Moving Average Phase input int secondMaPeriod=40; //2nd Moving Average Phase double oscilator#91;#93;; dual ma#91;#93;; dual secondMA#91;#93;; // ------------------------------------------------------------------ //| Custom indior initialization function | // ------------------------------------------------------------------ int OnInit() //-- indior buffers mapping SetIndexBuffer(0,oscilator); SetIndexBuffer(1,ma); SetIndexBuffer(2,secondMA); SetIndexLabel(0,OSCILATOR); SetIndexLabel(1,MA); SetIndexLabel(2,2nd MA); //-- return(INIT_SUCCEEDED); // ------------------------------------------------------------------ //| Custom indior iteration function | // ------------------------------------------------------------------ int OnCalculate(const int rates_total, const int prev_calculated, const datetime time#91;#93;, const double available#91;#93;, const double high#91;#93;, const double non#91;#93;, const double shut#91;#93;, const extended tick_volume#91;#93;, const long volume#91;#93;, const int spread#91;#93;-RRB- //-- drawOscilator(oscilatorPeriod); drawMovingAverage(maPeriod,oscilator,ma); drawMovingAverage(secondMaPeriod,oscilator,secondM A); //-- return value of prev_calculated for next call yield(rates_total); // ------------------------------------------------------------------ void drawOscilator(int interval) for(int I=0;ilt;Bars-1;I ) oscilator#91;I#93;=iCCI(Symbol(),PERIOD_CURRENT,in terval,PRICE_TYPICAL,I); void drawMovingAverage(int interval, double oscilatorVar#91;#93;,dual maVar#91;#93;-RRB- for(int I=0;ilt;ArraySize(oscilatorVar)-period;I ) maVar#91;I#93;= calculateMA(period,I,oscilatorVar); dual calculateMA(int interval, int index, double oscilatorVar#91;#93;-RRB- dual ma=0; for(int I=index;ilt;index interval;I ) //ma=ma oscilatorVar#91;t#93;; ma =oscilatorVar#91;t#93;; yield ma/period;

  3. #43
    Quote Originally Posted by ;
    quote I set that as an example. You notice there are 3 things. Rectangle (your own fibonacci SR) along with your price labels. From this code, all you need to do is just change the name of the object and the X axis (Date time) and Y axis (price) value. Go read the documentation that is MQL4.
    Hi Yousername
    I have a rather interesting indior with a little Problem: it isn't painting correcktly the last two values on the chart.
    I put in it and you'll see. I'd appreciate if you could fix that issue and give the document into the forum.
    Due Wolfhttps://forexintuitive.com/attachmen...6513293274.mq4

  4. #44
    Quote Originally Posted by ;
    quote I set that as an example. You notice there are 3 things. Rectangle (your fibonacci SR) and your price labels. From that code, all you have to do is just change the title of the item and the X axis (Date time) and Y axis (price) value. Go read the MQL4 documentation.
    Hi Yousername
    I've a very interesting indior with a little Problem: it is not painting correcktly the previous 2 values on the chart.
    I add it and you'll see. I'd appreciate if you could fix that issue and provide the file to the forum.
    Thanks Wolfhttps://forexintuitive.com/attachmen...7613784747.mq4

  5. #45
    Quote Originally Posted by ;
    quote Hi Yousername I've a very interesting indior with a little Problem: it is not painting correcktly the last 2 values on the chart. It is added by me and you will see. I'd appreciate if you could fix that problem and give the document into the forum. Thanks Wolfdocument
    Sorry can't and won't help. Your code appears like it is a decompile code and you also claim it's yours. The variables name there seem so effing confusing and I do not have time to go through it. So I wont assist.
    Beside I really don't see any problem with the indior result...

  6. #46
    Hello ,
    Thank you for starting this thread, I hope its gets me to learn to do my own things daily.

    I've this indior I got that stretches rectangles on the chart. I use it to label identified support and resistance levels. The thing it keeps extending automatically into the long term. But I would like it to cease to extend once future price has penetrated the rectangle. I checked the code but doing what I want is a bit beyond me. Any hints will be appreciated.
    https://forexintuitive.com/attachmen...7541949628.mq4

  7. #47
    Hi ,
    Thanks for starting this thread, I hope its makes me to understand to do my own stuff one day.

    I have this indior I got that stretches rectangles on the chart. I use it to label identified support and resistance levels. The thing it keeps expanding automatically into the future. But I would like it to stop to expand once future price has penetrated the rectangle. I checked out the code but doing exactly what I need is a bit beyond me. Any hints will be appreciated.
    https://forexintuitive.com/attachmen...1630339215.mq4

  8. #48
    Quote Originally Posted by ;
    https://youtu.be/92pw3UvDklo Below is the code that I use in the video Please play around with the code, try out the indior library offered in the MQL4 doc reference website https://docs.mql4.com/indiors // ------------------------------------------------------------------ //| tutorial1.mq4 | //| Copyright 2017, MetaQuotes Software Corp.. | //| https://www.mql5.com | // ------------------------------------------------------------------ #property copyright Copyright 2017, MetaQuotes Software Corp. #property link https://www.mql5.com...
    hii ,I see you're a progammer FX indior, will you help me to add push notifiions on my indior, to make it easier for me to trade if there are notifiions . . Thanks a lot
    https://forexintuitive.com/attachmen...2147418507.mq4

  9. #49
    Quote Originally Posted by ;
    https://youtu.be/92pw3UvDklo Below is the code I use in the movie Please play around with the code, try out the indior library offered in the MQL4 doc reference site https://docs.mql4.com/indiors // ------------------------------------------------------------------ //| tutorial1.mq4 | //| Twist 2017, MetaQuotes Software Corp.. | //| https://www.mql5.com | // ------------------------------------------------------------------ #property copyright Copyright 2017, MetaQuotes Software Corp. #property link https://www.mql5.com...
    hii ,I see you are a progammer forex indior, can you help me to add push notifiions on my indior, to make it much easier for me to exchange whether there are notifiions . . thanks a lot
    https://forexintuitive.com/attachmen...9748509064.mq4

  10. #50
    Hi,

    I'm searching for a Trade Management EA which will use an indior, whose name will be awarded with a parameter. That indior will provide a profit target, above the price if a buy is triggered and below the price if a market is triggered.

    The Trade Management EA will then need to open a sell/buy order if there isn't already a trade opened to your currency pair and also the profit target is farther compared to N (parameter) pips from the profit target.

    The Trade Management EA will manage the opened orders like this:
    - A new order ought to be opened each time that the price is moving in the opposite way by 2 times the gap between the former order and also the profit target level. The new orders opened this way have the exact same profit goal.
    - Even when the condition above is met, no new order is opened if the margin is greater than x% (parameter) of the free margin staying.
    - When all of the orders for the currency pair are closed, the EA unlocks a new order on any new legitimate profit target supplied by the indior.

    Daniel

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