Explore the latest free tools from the MQL5 community. Here's a new indicator, expert advisor, or script for MetaTrader.

This is a class that will allow to open, close and modify your position by placing orders with really simple commands and configuration: Buy(), Sell(), Close(), Modify().
It has never been so easy! :)
Sample:
Smooth out market noise with the Heiken Ashi Expert Advisor for MT4 and MT5. Reliable trend-following automation. Details here.
#include <K_Orders.mqh> input int TP = 70; input int SL = 20; input double Lots=0.2; Order order; //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- set default values order.SetLots(Lots); order.SetMagic(123); order.SetSL_inPoints(SL); order.SetTP_inPoints(TP); order.SetComment("MyExpert"); order.Buy(); // Buy order.Sell(); // Close buy order order.Buy(); // Buy again // order.SetSL_inPrice(1.26685); // Specify StopLoss value in "Price" order.SetTP_inPoints(30); // Specify TakeProfit value in "Points" order.Modify(); // Do the modification order.Close_Volume(0.1); //Close half from 0.2 volume order order.Close(); //Close the rest }
Thanks for reading. Discover premium MetaTrader solutions at RobotFX.
173