Sorry for the English, but I'm using google translator to write, great work and excellent source of education have found this forum, I wonder if someone can post a script to open orders quickly set SL and TP, it will greatly help a newbie in forex .
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Trailing Stops
would like to see a good function for trailing stops if possible
would like to see a good function for trailing stops if possible
Thanks shawnmstout for your contribution. Much appreciated!
A TS function could be tricky, this could be dependent on how each individual EA is coded. Would be a nice tool to have.
Anyone?
would like to see a good function for trailing stops if possible
Go to this thread:
https://www.mql5.com/en/forum/172924
b.
Another good label making function:
{
if(ObjectFind(Name) == -1)
ObjectCreate (Name, OBJ_LABEL, 0, 0, 0);
ObjectSet (Name, OBJPROP_XDISTANCE, x);
ObjectSet (Name, OBJPROP_YDISTANCE, y);
ObjectSetText (Name, Text, Size, Font, Color);
} [/PHP]
An example of how to use it:
[PHP]SetLabel("1","My Custom Label",10,20,"Courier",15,Red);This has been fun to use for me, hope others find this helpful.
Save Ticks in Array
Ever wanted to save the ticks in real time in an array for your EA to use in some way?
Function to save real time ticks in an array:
double bid[Array_Length];
void TickSave()
{
for ( int i = Array_Length-1; i > 0; i-- )
bid = bid;
bid[0] = Bid;
} [/PHP]
Function to clear the array:
[PHP]void ClearTickSave()
{
for ( int i = Array_Length-1; i >= 0; i-- )
bid = 0;
}I included a simple EA to show how this works. It simply saves the ticks, and shows the most recent ticks as comments on your screen.
bid[0] is the current tick.
script to open orders quickly set SL and TP
Go to this thread:
https://www.forex-tsd.com/expert-advisors-metatrader-4/58-trailing-stop-ea.html [/ url]
b. [/ QUOTE]
Hello everyone,
Sorry for the English, but I'm using google translator to write, great work and excellent source of education have found this forum, I wonder if someone can post a script to open orders quickly set SL and TP, it will greatly help a newbie in forex .
Thank you.