Forum

Help with custom Lots

Hello, im new with MQL5 and im still learning to make EA, i need help with the following: #include <Trade/Trade.mqh> CTrade m_trade; input int InpOpenPositions = 0 ; // Open position ("0" -> BUY, "1" -> SELL) input int TakeProfit = 60 ; input int StopLoss = 20 ; int OnInit () { //--- set

Creating StopLoss & TakeProfit Code

Hello! I am new here, also new with the MT5 & Trading etc, and i want to create a simple EA that sets buy/sell with StopLoss and TakeProfit. Anybody got an example on the code for SL and TP? it doesnt have to be an automated sell and buy, just to make it Takt Profit or Stop Loss at a certain value