![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
K thanks new digital. I'm not going mad then
I have just signed up for the elite section does this happen straight away for access
(edit) YOu can delete this response I now have access. cant see anywhere to do it my self
Move Stop and Take profit line by hand with this script: https://www.mql5.com/en/forum/177583/page34
EA based on buystop limit order at math lines
hello everyone, ive been trading on demo the sb murray math lines. setting limit orders at last three lines of support and resistance with averageing down twice. seems to be working. my sl is for both positions around 150 ticks and tp at 50 ticks. ticks pips. its all the same.
i was wondering if there is a ready EA out there as i am nowhere near the programming knowledge that is required. any help?????
Buy/sell script
I would like to see if this script could be modified to place limit orders instead of market. Also add a spread calculation line.
BUY
#include
#include
#property show_inputs
extern int TakeProfit = 100,
StopLoss = 50;
extern double Lots = 0.2;
extern bool MM = true;
extern double PercentRisk = 1;
extern bool Confirm = false;
extern int Slippage = 3;
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
//----
if (MM)
{
double PipValue = MarketInfo(Symbol(), MODE_TICKVALUE);
Lots = NormalizeDouble((AccountBalance() * PercentRisk / StopLoss / PipValue / 100.0),2);
}
Print ("PipValue = ",PipValue);
Print ("Lots = ",Lots);
double tpPrice = Ask + TakeProfit * Point;
if (TakeProfit == 0) tpPrice = 0;
double slPrice = Ask - StopLoss * Point;
if (StopLoss == 0) slPrice = 0;
if(Confirm)
{
string LOTS = DoubleToStr(Lots,2);
if(MessageBox("Do you really want to BUY "+LOTS+" "+Symbol()+" at ASK price? ",
"Script",MB_YESNO|MB_ICONQUESTION)!=IDYES) return(1);
}
OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, slPrice, tpPrice);
//----
return(0);
}
//+------------------------------------------------------------------+
SELL
#include
#include
#property show_inputs
extern int TakeProfit = 100,
StopLoss = 50;
extern double Lots = 0.2;
extern bool MM = true;
extern double PercentRisk = 1;
extern bool Confirm = false;
extern int Slippage = 3;
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
//----
if (MM)
{
double PipValue = MarketInfo(Symbol(), MODE_TICKVALUE);
Lots = NormalizeDouble((AccountBalance() * PercentRisk / StopLoss / PipValue / 100.0),2);
}
Print ("PipValue = ",PipValue);
Print ("Lots = ",Lots);
double tpPrice = Bid - TakeProfit * Point;
if (TakeProfit == 0) tpPrice = 0;
double slPrice = Bid + StopLoss * Point;
if (StopLoss == 0) slPrice = 0;
if(Confirm)
{
string LOTS = DoubleToStr(Lots,2);
if(MessageBox("Do you really want to SELL "+LOTS+" "+Symbol()+" at BID price? ",
"Script",MB_YESNO|MB_ICONQUESTION)!=IDYES) return(1);
}
OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, slPrice, tpPrice);
//----
return(0);
}
//+------------------------------------------------------------------+
Thanks in advance for your help
hello everyone, ive been trading on demo the sb murray math lines. setting limit orders at last three lines of support and resistance with averageing down twice. seems to be working. my sl is for both positions around 150 ticks and tp at 50 ticks. ticks pips. its all the same.
You need to check current thread. There are plenty of EAs that can do that
I would like to see if this script could be modified to place limit orders instead of market. Also add a spread calculation line.
I think by just changing OP_BUY by OP_BUYLIMIT (OP_BUYSTOP) things should work
I think by just changing OP_BUY by OP_BUYLIMIT (OP_BUYSTOP) things should work
Thanks Linuxser. Already try it but not working.
Auto Stop Loss
Hi All,
I need an Ea that sets the stop loss automatically and as soon as I take a position. I don't need any trailing stop loss. I just need it to set the stop loss. The stop loss has to be placed physically not just as a hidden stop loss that will be executed by the EA.
Do you know such an EA?
Thanks for your support,
Vahid
Here is what you want.
This utility EA places Stoploss & TakeProfit if there are positions without them.
If you don't want to set TP, It can be turned off.
SL & TP can be defined by pips-based or ATR-based method.
Initially, functions are off. Turn them on or rewrite settings as you like and recompile.
how to use:
just apply any chart.
Close order script and turn of alert scripts
This is my first posting on any blog
When I am trading the indicator alert scripts (at least 5)keeps on coming up when trading. I dont want to disable the alert all the time.
This stops quick hotkey trade.
I would like a script to diable this function temporarily when trading.
Also I would like a script to close the highlighted order in the terminal window
I have one for buying, selling, closing all, reversing but alas not for cloing the current order.
Better still be a Mt4 day trading terminal with all these functions build in.
I look forward to some expert advice