# 'Close all'/'Open' tools - page 25

Moderator
111269

Hi marine1983,

I moved your post to this thread as I remember I posted those scripts (created by Igorad) few weeks ago on the thread.

27

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

5921

Move Stop and Take profit line by hand with this script: https://www.mql5.com/en/forum/177583/page34

8

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?????

40

I would like to see if this script could be modified to place limit orders instead of market. Also add a spread calculation line.

#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);

}

//----

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);

}

//+------------------------------------------------------------------+

5921

andreasp70:
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?????

You need to check current thread. There are plenty of EAs that can do that

5921

AstroGlide:
I would like to see if this script could be modified to place limit orders instead of market. Also add a spread calculation line.

40

Linuxser:

Thanks Linuxser. Already try it but not working.

16

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?

Vahid

69

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.

Files: