Forum

Get time of High & Low since Open[8] ?

Hello everyone, Please can I have some help with this coding problem. I need to assign values to 4 variables for further use in my simple EA. double HighVal //HighVal is the highest bid value since Open[8] datetime HighTime //HighTime is the time of the highest bid since Open[8] double LowVal

Partial close?

Hi Forum, Can anyone confirm that it is possible to scale into a position, buy1, buy2, buy3 then close half of each position on a closing signal, and the other half at the secondary signal? example: buy1 = 1 lot @ 0.89833 buy2 = 1 lot @ 0.89835 buy3 = 1 lot @ 0.89837 Average buy price = 0.89835

Use Sleep() to delay trades ?

Hi Forum, I want to experiment delaying orders after receiving a trade signal. Would I use the sleep() function? and if so, where's the best place to insert it, above the lot calculation? https://www.mql5.com/en/docs/common/sleep //--- open buy (first) if (signals) {

Buy/Sell to close >5 lots breaks Comp Rules???

Hi, My EA pyramids (x3) into a position with max lots per position, set to 5. When I Buy to close or Sell to close out all positions, I could be closing 15 lots max. I understand that there is a 5lot max per order in the comp, but closing out the positions in one order, would essentially be greater

Help converting simple MT4 into MT5

Hi to the Forum, I need help! I am trying to translate my MT4 code into MT5, and need some clues. I looked for a suitable replacement for OrderClose() but I'm just going round in circles! Could anyone help me replace the functions used in the code sample with the MT5 equivalent? Thanks everyone