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