paymanz

Trader
Nov 24, 2020
5
0
17
24
hi dear developer , is it possible to implement a fixed lot size order type into the EA? fixed lot+fixed SL .
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,312
1,530
144
Odesa
www.earnforex.com
I have been using the MT5 version manually for a long time, it is excellent and works across all the brokers and pairs I trade. I recently started creating some EAs to automate my trding and I want to use this EA to help calculate the position size.
Is there a way to include a class into my existing EA and call a function and provide some variables such as entry price and stop loss price, risk and get the position size result back?
It's not as simple as that, but yes, if you know MQL5 coding, you can use the RecalculatePositionSize() function in your EA to calculate the size.
 
  • 👍
Reactions: Cass0wary

EnrichWave

Master Trader
May 15, 2018
382
98
74
India
@Enivid there is one option field missed to implement, that is "Max Allowed risk percentage per trade"
If that field filled with 1%.. and a trader trying to place 1.5%, will lead alert message will be nice one Enivid.

BR
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,312
1,530
144
Odesa
www.earnforex.com
Thank you for the answer.

To EA get this done do we need to keep it open on the same chart right? I mean this is mandatory?
If you just want to open a trade divided into several positions each with its own TP, you only need the EA to execute that. After that, you can safely remove the Position Sizer or close the platform. Take-profits are server-side.
 

svob

Newbie
Jul 30, 2024
12
2
3
36
Hi!
I took a look to the forum regarding my issue, but found no clearly solutions.

I try to execute trade on custom symbol, without success. Position size is zero, message is according to that (see screenshots).

As TradeSymbol in settings I tried to put as follows:
.USTECHCash_S15
USTECHCash_S15
.USTECHCash_S15,M1
USTECHCash_S15,M1

It doesn´t help unfortunatelly.

Please advise me at correct approach.

No solutions for that? Please support..
 

El_Hamster

Trader
Aug 5, 2024
11
0
6
59
Hi,
I've been using the Position Sizer for about a month now. Loved it so far.
However I recently made some adjustments in the EA's properties table and I can't quite remember what I messed up. Now all of a sudden, all my trades are being closed when they hit breakeven.
Can anybody point me in the right direction, and tell me what I did wrong, please?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,312
1,530
144
Odesa
www.earnforex.com
Hi!
I took a look to the forum regarding my issue, but found no clearly solutions.

I try to execute trade on custom symbol, without success. Position size is zero, message is according to that (see screenshots).

As TradeSymbol in settings I tried to put as follows:
.USTECHCash_S15
USTECHCash_S15
.USTECHCash_S15,M1
USTECHCash_S15,M1

It doesn´t help unfortunatelly.

Please advise me at correct approach.
Custom symbols cannot be traded. You should put the actual (non-custom) symbol's name in the TradeSymbol input parameter. Unfortunately, I have no idea what's the name of the symbol that you intend to trade.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,312
1,530
144
Odesa
www.earnforex.com
Hi,
I've been using the Position Sizer for about a month now. Loved it so far.
However I recently made some adjustments in the EA's properties table and I can't quite remember what I messed up. Now all of a sudden, all my trades are being closed when they hit breakeven.
Can anybody point me in the right direction, and tell me what I did wrong, please?
I'm not sure, but perhaps you've set the Breakeven field to 1 point or something similar? Attaching the screenshots of your panel and the .set file with the input parameters would definitely help to diagnose the issue more accurately.
 

El_Hamster

Trader
Aug 5, 2024
11
0
6
59
I'm not sure, but perhaps you've set the Breakeven field to 1 point or something similar? Attaching the screenshots of your panel and the .set file with the input parameters would definitely help to diagnose the issue more accurately.
Ah ok. Yeah I think I might have set the BE field to 1. I didn't understand that this actually means "close when profit reaches 1 point". I thought I just get 1 breakeven quick button or something like it. Thank you very much.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,312
1,530
144
Odesa
www.earnforex.com
Ah ok. Yeah I think I might have set the BE field to 1. I didn't understand that this actually means "close when profit reaches 1 point". I thought I just get 1 breakeven quick button or something like it. Thank you very much.
It means that when a position reaches 1 point of profit, it's SL is automatically moved to the breakeven level (0 profit). In most cases, this would mean that upon reaching that 1 point of profit, the trade will get closed almost immediately.
 
  • 👍
Reactions: El_Hamster

svob

Newbie
Jul 30, 2024
12
2
3
36
Custom symbols cannot be traded. You should put the actual (non-custom) symbol's name in the TradeSymbol input parameter. Unfortunately, I have no idea what's the name of the symbol that you intend to trade.
Thank you for reply.
I intend to trade 15-seconds chart from .USTECHCash. So, now I have put the original symbol as input parameterm, but it doesn´t work. What is wrong?
 

Attachments

  • Screenshot 2024-08-05 205241.png
    Screenshot 2024-08-05 205241.png
    419.6 KB · Views: 4
Last edited:

Enivid

Administrator
Staff member
Nov 30, 2008
19,312
1,530
144
Odesa
www.earnforex.com
Thank you for reply.
I intend to trade 15-seconds chart from .USTECHCash. So, now I have put the original symbol as input parameterm, but it doesn´t work. What is wrong?
Yes, .USTECHCash looks like the right value to put there, but the issue here isn't with trading, it's before that. It looks like your custom symbol's specification isn't filled correctly. Could you please show if there are any messages when you attach the Position Sizer there (before you try to execute a trade)?
 

svob

Newbie
Jul 30, 2024
12
2
3
36
Yes, .USTECHCash looks like the right value to put there, but the issue here isn't with trading, it's before that. It looks like your custom symbol's specification isn't filled correctly. Could you please show if there are any messages when you attach the Position Sizer there (before you try to execute a trade)?
Hi Enivid,

I attached and then removed the Sizer. Messages in screenshot.
 

Attachments

  • Screenshot 2024-08-06 084534.png
    Screenshot 2024-08-06 084534.png
    92.4 KB · Views: 5

svob

Newbie
Jul 30, 2024
12
2
3
36
Hm.. values are the same. They have been copied automatically at creation of custom symbol by the Seconds Charts EA.
 

Attachments

  • Screenshot 2024-08-06 110018.png
    Screenshot 2024-08-06 110018.png
    309.9 KB · Views: 3
Last edited:

Enivid

Administrator
Staff member
Nov 30, 2008
19,312
1,530
144
Odesa
www.earnforex.com
Hm.. values are the same. They have been copied automatically at creation of custom symbol by the Seconds Charts EA.
You are right, the specification looks correct. However, there's definitely some problem with the custom symbol. I'm using the same RoboForex MT5 demo server and I've just created a custom symbol out of .USTECHCash and it works just fine:
ps_custom.png
Can you share that Seconds Charts EA here? Or is it a proprietary one?