Close At Profit EA - page 4

 

Yes, I see at line 40 that all is in order. I apologize for the distraction.

And yes, I notice now a figure (-0.891) in the upper left corner when I set CloseAtPipsProfit to 2. But trades in profit are still not closed.

 
Pips4Fun:
Yes, I see at line 40 that all is in order. I apologize for the distraction. And yes, I notice now a figure (-0.891) in the upper left corner when I set CloseAtPipsProfit to 2. But trades in profit are still not closed.

It means that before you did not set the CloseAtPipsProfit to number bigger than 0.

You know what

Will make a video of that EA closing orders that reached desired profit in pips (regardless of how many orders are there opened at the same account) since it works perfectly what it is supposed to do - in your case it has to close all orders (if the AllSymbols is set to true)) that have more than or equal to 2 pips of profit. Will do it on Monday (no time now). Have a nice weekend

 
mladen:
It means that before you did not set the CloseAtPipsProfit to number bigger than 0.

You know what

Will make a video of that EA closing orders that reached desired profit in pips (regardless of how many orders are there opened at the same account) since it works perfectly what it is supposed to do. Will do it on Monday (no time now). Have a nice weekend

I did set the number to greater than 0. I must have failed to notice the solitary number at top left. And indeed, the number is currently set at 2, but trades are still open.

M, I am so so grateful for the time you've given me, especially regarding an ea that is working at your end - and late on a Friday for that matter. I'm sure there's something amiss at my end and I will look closely at everything again over the weekend. I look forward to the video you're planning.

I really appreciate your patience and help over this. I want again to wish you and your loved ones a very good weekend.

With best regards.

 
Pips4Fun:
I did set the number to greater than 0. I must have failed to notice the solitary number at top left. And indeed, the number is currently set at 2, but trades are still open.

M, I am so so grateful for the time you've given me, especially regarding an ea that is working at your end - and late on a Friday for that matter. I'm sure there's something amiss at my end and I will look closely at everything again over the weekend. I look forward to the video you're planning.

I really appreciate your patience and help over this. I want again to wish you and your loved ones a very good weekend.

With best regards.

And please before you go, could you please state what the significance of the top left figure is. Right now, I have CloseAtPipsProfit set to 2, AllSymbols set to false and there's a Buy trade over 10 pips in profit on EJ. The figure is -1.958. What exactly does it mean?

 
Pips4Fun:
And please before you go, could you please state what the significance of the top left figure is. Right now, I have CloseAtPipsProfit set to 2, AllSymbols set to false and there's a Buy trade over 10 pips in profit on EJ. The figure is -1.958. What exactly does it mean?

Pips4Fun

Please read the explanation what are the meanings of parameters at this post : https://www.mql5.com/en/forum/181356

Will make a video to post it here to show how and what does that EA do.

 
mladen:
Sorry to ask, but how are you testing it and on what symbols? What is it written out in the upper left corner?

The usual way: I drag the ea onto the chart and the user options box appears. I select the options and click ok. Nothing is written out in the upper left corner. The upper right corner shows the name of the ea Close all at pips profit 1.01 with a smiley face next to it. The charts I applied it to are EJ (AllSymbols false) and GU (AllSymbols true).

Please take a look at this post by Raptor on the MQL forum.

Could the issue be that the loop is incrementing instead of decrementing to zero?

 
Pips4Fun:
The usual way: I drag the ea onto the chart and the user options box appears. I select the options and click ok. Nothing is written out in the upper left corner. The upper right corner shows the name of the ea Close all at pips profit 1.01 with a smiley face next to it. The charts I applied it to are EJ (AllSymbols false) and GU (AllSymbols true).

Please take a look at this post by Raptor on the MQL forum.

Could the issue be that the loop is incrementing instead of decrementing to zero?

If nothing is written in your upper left corner then you are doing something wrong

No need to look at the raptors post, since the EA works as it should as far as orders closing is concerned - the loop is working perfectly (take a look at the line 40). Set the CloseAtPipsProfit to value > 0 and then see what is it going to show in the upper left corner

 
mladen:
Pips4Fun

Please read the explanation what are the meanings of parameters at this post : https://www.mql5.com/en/forum/181356

Will make a video to post it here to show how and what does that EA do.

OK, thank you.

 

Looking for an Expert Advisor which closes the trade if the trade is in profit.

Hello Friends, I am trading a scalping strategy which is doing really well for me. Now i am looking for an EA that closes trades on the close of the candle. i.e if it is profitable or the next candle unless the candle closes profitable. I don't want to have a profit target set just the close of a profitable candle. It sounds simple but i am no programmer if anyone has this kind of EA i will really appreciate it. Happy trading and make lots of pips.

 
mladen:

...

Jack

You are right. The only limitation that you might run into is the duration of an order (some brokers will not let you close an order that was not opened at least nn minutes ago - the so called "anti scalping rule") so you have to check it with your broker, but as far as the distance is concerned hidden sl and tp will allow you closing an order regardless of the minimal stop loss / take profit distance

just wondering if we leave everything to default and just set the tp. and can you show us a visual. i dont know which setting to change?
Reason: