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

Sergey Golubev
Moderator
111269
Sergey Golubev  

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.

marine1983
27
marine1983  

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

Linuxser
5921
Linuxser  

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

andreasp70
8
andreasp70  

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

AstroGlide
40
AstroGlide  

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

Linuxser
5921
Linuxser  
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

Linuxser
5921
Linuxser  
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.

I think by just changing OP_BUY by OP_BUYLIMIT (OP_BUYSTOP) things should work

AstroGlide
40
AstroGlide  
Linuxser:
I think by just changing OP_BUY by OP_BUYLIMIT (OP_BUYSTOP) things should work

Thanks Linuxser. Already try it but not working.

vahid123
16
vahid123  

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

latimeria
69
latimeria  

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.