BUYSTOP SCRIPT that move SL to breakeven as soon as current price is precisely over by 1pippett

 

Hi guys... i'm new to mql5 and programming generally and would love for assistance to these codes..

...this is how far i could go

#include<Trade\Trade.mqh>
   void OnTick()
   {


   }


i know some functions required like ordersend(), ordermodify(), orderopenprice(), orderstoploss(), gettingcurrentmarketprice

dont know how to work them

Thanks for your help!

 

Example: open a BUY position with a volume of 1 lot.

//+------------------------------------------------------------------+
//|                                                     Open Buy.mq5 |
//|                         Copyright © 2018-2021, Vladimir Karputov |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2018-2021, Vladimir Karputov"
#property version   "1.001"
//---
#include <Trade\Trade.mqh>
CTrade         m_trade;                      // trading object
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   m_trade.Buy(1.0); // open Buy position, volume 1.0 lot
  }
 
bulletproof:

Hi guys... i'm new to mql5 and programming generally and would love for assistance to these codes..

...this is how far i could go


i know some functions required like ordersend(), ordermodify(), orderopenprice(), orderstoploss(), gettingcurrentmarketprice

dont know how to work them

Thanks for your help!

LOL... is this a joke?
 
trevor88 #:
LOL... is this a joke?
i dont understand your meaning of "joke" but if you can help i'll appreciate it
 
Vladimir Karputov #:

Example: open a BUY position with a volume of 1 lot.

Thanks Vladimir... would appreciate for the full code