Posts

Showing posts from November, 2024

MQL5: Create Buy and Sell arrow

 void buydraw()   {    string arrowName="BUYSIGNAL"+iTime(Symbol(),PERIOD_CURRENT,0);    ObjectCreate(Symbol(),arrowName,OBJ_ARROW_BUY,0,iTime(Symbol(),PERIOD_CURRENT,1),iHigh(Symbol(),PERIOD_CURRENT,1));    ObjectSetInteger(0, arrowName, OBJPROP_COLOR, clrLimeGreen);   } //+------------------------------------------------------------------+ //|                                                                  | //+------------------------------------------------------------------+ void selldraw()   {    string arrowName="SELLSIGNAL"+iTime(Symbol(),PERIOD_CURRENT,0);    ObjectCreate(Symbol(),arrowName,OBJ_ARROW_SELL,0,TimeCurrent(),iHigh(Symbol(),PERIOD_CURRENT,1));    ObjectSetInteger(0, arrowName, OBJPROP_COLOR, clrGold);   } //+-----------...

MQL5: Create Horizontal line with give price

 void CreateRedLine(double price)   {    string lineName = "RedLine_" + DoubleToString(price, _Digits);    if(ObjectFind(0, lineName) != -1)      {       ObjectDelete(0, lineName);      }    if(ObjectCreate(0, lineName, OBJ_HLINE, 0, 0, price))      {       ObjectSetInteger(0, lineName, OBJPROP_COLOR, clrRed);       ObjectSetInteger(0, lineName, OBJPROP_WIDTH, 2);       ObjectSetInteger(0, lineName, OBJPROP_STYLE, STYLE_SOLID);      }    else      {       Print("Error creating red horizontal line at price ", price);      }   }

Mql5: Pnl calculation last 24 hour

 //+------------------------------------------------------------------+ //|                                      order pnl today history.mq5 | //|                                  Copyright 2023, MetaQuotes Ltd. | //|                                             https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2023, MetaQuotes Ltd." #property link      "https://www.mql5.com" #property version   "1.00" #include <Trade\Trade.mqh> //+------------------------------------------------------------------+ //| Expert initialization function                ...

Manan The Power (satyavir)

 //+------------------------------------------------------------------+ //|                                                    10 ka dum.mq5 | //|                                  Copyright 2023, MetaQuotes Ltd. | //|                                             https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2023, MetaQuotes Ltd." #property link      "https://www.mql5.com" #property version   "1.00" #include <Trade\Trade.mqh> CTrade trade; input int MagicNumber=12345; input double rangeround=5; input double TradeDistance=1; input double Buylotsize=0.01...

Manan The super power (Satyavir )

 //+------------------------------------------------------------------+ //|                                                    10 ka dum.mq5 | //|                                  Copyright 2023, MetaQuotes Ltd. | //|                                             https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2023, MetaQuotes Ltd." #property link      "https://www.mql5.com" #property version   "1.00" #include <Trade\Trade.mqh> CTrade trade; input int MagicNumber=12345; input double rangeround=5; input double TradeDistance=1; input double Buylotsize=0.01...

The Manan (satyavir sachin)

 //+------------------------------------------------------------------+ //|                                                    The Manan.mq5 | //|                                  Copyright 2023, MetaQuotes Ltd. | //|                                             https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2023, MetaQuotes Ltd." #property link      "https://www.mql5.com" #property version   "1.00" #include <Trade\Trade.mqh> CTrade trade; input string TradeStartTime = "00:00"; input string TradeStopTime = "13:25"; input int MagicNumber=12345; input do...

MQL5: Dymmy ZigZag (Harish upwork strategy)

 //+------------------------------------------------------------------+ //|                                                 Dummy zigzag.mq5 | //|                                  Copyright 2023, MetaQuotes Ltd. | //|                                             https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2023, MetaQuotes Ltd." #property link      "https://www.mql5.com" #property version   "1.00" input string TradeStartTime = "00:00"; input string TradeStopTime = "13:25"; input bool Positional=true; input double MagicNumber=12345; input double Lotsize=1; input...

MQL5: Round price to nearest integer

 double RoundPrice(double price, double roundTo)   {    double remainder = fmod(price, roundTo);    double roundedPrice = price - remainder;    if(remainder >= roundTo / 2)       roundedPrice += roundTo;    return roundedPrice;   }

MT5 Trade Copier Same System

 //+------------------------------------------------------------------+ //|                                                      TradeCopier | //|                                      Copyright 2020, Programetix | //|                                       https://programetix.com/ | //+------------------------------------------------------------------+ #define FILE_NAME MQLInfoString(MQL_PROGRAM_NAME)+".bin" #include <Trade\Trade.mqh> #include <arrays\arraylong.mqh> //C:\Users\pulki\AppData\Roaming\MetaQuotes\Terminal\Common enum ENUM_MODE {MODE_MASTER,MODE_SLAVE}; input ENUM_MODE Mode=MODE_SLAVE; CTrade trade; //+---------------------------------...

Manan Superpower (satyavir)

 //+------------------------------------------------------------------+ //|                                                    10 ka dum.mq5 | //|                                  Copyright 2023, MetaQuotes Ltd. | //|                                             https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2023, MetaQuotes Ltd." #property link      "https://www.mql5.com" #property version   "1.00" #include <Trade\Trade.mqh> CTrade trade; input int MagicNumber=12345; input double rangeround=5; input double TradeDistance=1; input double Buylotsize=0.01...