• Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)

Suggestion If anyone can help me

Gold Mastering

Active Member
Credit Hunter
Credits
0
Hello,
I'm new in this forum section, and I'm new in the code Mql4 and I have an EA that is based on the strategy of the martingale everything works only I want him to add the option average trailing stop for it 'active for all lots not every single one, and hide the TP, SL and TS so that the broker does not see them.
So if anyone can help me I will be very grateful.
Regards,
NB: Attached the mql4 file.
 

Attachments

Calculate the Total Profit of all trades of the symbol and MagicNumber on each loop.

TP: Close all when reached your desired profit.
SL: Close all when reached the max loss you accept.

TS: Increase the max loss to breakeven plus x profit when you want to secure profit on the way and increase this x profit along with growing profit.
Hello,
thank you my brother all that I know but in code I sulfur I tried so much average TS I did not succeed ... !! if you know the coding does it for me even if it requires money I'm a taker.
Regards,
 
Calculate the Total Profit of all trades of the symbol and MagicNumber on each loop.

TP: Close all when reached your desired profit.
SL: Close all when reached the max loss you accept.

TS: Increase the max loss to breakeven plus x profit when you want to secure profit on the way and increase this x profit along with growing profit.
This is smart ea if we can calculated desired loss and profit
so still using risk management and risk management,
manual trading on micro account firewoodfx I am still use stop loss manual not ea
 
With the code but without trailing the results were better.
Modify and see what you can do.
Hi,
Thank you for your help you gave me a very good idea, but you do not find it a conflict of orders close? especially when you put money_profit_to_activate at 5 and money distance at 3.
Also if you have a money target and money guard I think it will remove the TP, SL, and also the TS at least it does not become necessary.
If you can see that again.
Thank you.
 
I did put a code to check each minute.
In my case this prevented the robot from closing that way.
It happened to me too.

Maybe open just once each bar can prevent this too.
Than you need to put the whole opening proces in a loop just like the other loop with minuto and newminuto.
Hello,
Ok, thank you very much for your help I am very grateful to you my friend...
:clap::clap:
 
It worked ?
You share the modified version ?
Hello,
I just changed Minute by Hour, and work on a TF M30 or H1, it works without problems...!!
Code:
   minuto = Hour ();
   if (minuto !=newminuto)
   {
   CountOrder();
   if (nAll==0) Max_Profit =0;   
   if (Profit > Max_Profit) Max_Profit = Profit;
   if (Max_Profit > Money_Profit_to_activate*Lots*100 && Profit < Max_Profit-Money_Distance*Lots*100) CloseAll();
   if (Profit < - Max_Loss) CloseAll(); 
   newminuto = minuto;
   }
Regards,
 
Back
Top