Forum

Position Ticket on open and close

Hi, I am looking to get the specific ticket position of orders when they hit a take profit or a stop loss. I wrote the following code to store the tickets whenever a new position is opened: if (trade.Buy(lot_min, _Symbol , ask, stop_loss, take_profit)) { Print ( "TICKET OPEN: " , PositionGetTicket (

CopyBuffer Oninit Tester - Not Working

Hi, I want to do some analysis of the data within the Oninit() function before entering the execution. The data I want to analyze are the ones of an indicator and for this reason I am using the CopyBuffer function : handle = iCustom ( _Symbol , PERIOD_CURRENT , "Custom\\indicator.ex5" ); double