![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Guys, thanks for your replies....but I'm a very big stupid man!!!
I didn't see the pharentesis that newdigital told me in his last post!!![](https://c.mql5.com/forextsd/smiles/frown.png)
Sorry guys for my fault!!However here there's the code how I put it. Hope I can help someone that has need of it
{
if (UseStopLoss) StopLossLevel = Ask - StopLoss * Point; else StopLossLevel = 0.0;
if (UseTakeProfit) TakeProfitLevel = Ask + TakeProfit * Point; else TakeProfitLevel = 0.0;
Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "MaxPower Buy Order", MagicNumber, 0, DodgerBlue);
DayOfLastTrade=(TimeDayOfYear(TimeCurrent()));
if(Ticket > 0) {
if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
Print("BUY order opened : ", OrderOpenPrice());
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Open Buy");
} else {
Print("Error opening BUY order : ", GetLastError());
}
}
}Regards,
Mauro
Update...![](https://c.mql5.com/forextsd/smiles/frown.png)
As I have written in the post above the MQLeditor doesn't find any error. But I have attached the EA on the chart and it doesn't limit the order as I want (for example: if GU open a Buy Position and after it is closed, immediately after the EA reopen the buy order if it finds the signal. Instead I want that it doesn't open anymore buy orders).
Any suggestion?Maybe I've placed the code in the worst way...
Thanks for your help...
Mauro
It's all that we have concerning buy/sell.
Your case probable should be programmed so I was just made some attention.
For example this Frank EA can be modified.
I just attached this EA to the charts in the morning:
Hi,ND.
could you give me a link to the ea you metioned above?
Is it frank ea modified?
thanks![](https://c.mql5.com/forextsd/smiles/nerd.png)
It was original Frank. Look at this post https://www.mql5.com/en/forum/general
Modified Frank.
Kalenzo modified Frank EA according to my request added timefilter to the trading martingale cycle (new cycle will not be started within some predefined trading hours). It is in elite section so it is better to ask Kalenzo.
So, it is only different between modified and original Frank EAs.
i tried the set2stoporders ea from page1 but it opened multiple orders, and i don't know how to fix it, can anybody help.
i want it to open 1buy&1sell stop only each week.
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
void start() {
double ldStop=0, ldTake=0;
double pAsk=Ask+DistanceSet*Point;
double pBid=Bid-DistanceSet*Point;
if (StopLoss!=0) ldStop=pAsk-StopLoss*Point;
if (TakeProfit!=0) ldTake=pAsk+TakeProfit*Point;
SetOrder(OP_BUYSTOP, pAsk, ldStop, ldTake);
if (StopLoss!=0) ldStop=pBid+StopLoss*Point;
if (TakeProfit!=0) ldTake=pBid-TakeProfit*Point;
SetOrder(OP_SELLSTOP, pBid, ldStop, ldTake);
}
haii...I think this is the best for me to try testing EA
EA System
Hello i am looking for an ea which can do this:
1) buy or sell at a price level
2) if last trade hit TP then, immidiately opens another trade in same direction
3) if last trade hit SL then, immidiately opens another trade in opposite direction
Any help would be appriciated.
Thanks
Pete
Open 2 stop orders (sell stop and buy stop) by one script at the same time.
Script.
Download.
Author: KimIV.
Websource (in Russian).
That's all that I found.How can I add the code to make it open the trades at a specific time?
Thanks
indeed......
Hello i am looking for an ea which can do this:
1) buy or sell at a price level
2) if last trade hit TP then, immidiately opens another trade in same direction
3) if last trade hit SL then, immidiately opens another trade in opposite direction
Any help would be appriciated.
Thanks
Pete(Request) Buy/Sell Scripts
Hello;
I've searched the forum But unfortunately I could not find what I am looking for.
I need Buy /Sell scripts for EurUsd and GbpUsd pairs.
It should open 0.1 lot Buy order For EurUsd and GbpUsd same time.
and Second script should open Sell Order for same pairs.
and I would like to be able to change lot size and pairs.
I appreciate if coders help me out ;
or someone provides a link if scripts already posted before.
Thank you.