Phy,
Sorry, I only saw one line of your response and misunderstood your comment.
I had a look at OrderSend(), I am quite new to coding and I am afraid I will require your patience.
Thank you for your response.
I trade manually with tight stops. Sometimes I do not have time to modify the order with the appropriate stop and I would like to run a script that would execute the same stop calculation and execution each time I place an order. Is this what the OrderSend() does?
A script (or preferably, an EA) can run, continually monitoring all your open trades, and set initial stops or modify existing stops as you require.
Ah yes, there is the problem.
I was hoping someone had already created such a program and I could just drop it into my files.
I am currently not able to write my own programs. However, I am interested in learning the programming language.
Do you have any recommendations for me?
In your MT4 is a sample script named close.mq4
View -- Navigator -- Scripts --
There is a script named "close"
right-click it, and select Modify.
The editor opens the source code for that script.
You are now in the development environment for MT4, which includes the language reference.
I opened the script.
It looks very nice. I don't have a clue what to do with it.
How would this script be applied?
I am currently not able to write my own programs. However, I am interested in learning the programming language.
Do you have any recommendations for me?
Well, that's how you get started...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I would like to have a fixed stop order opened whenever I take a position.
For example, if I buy at "x", a stop order would automatically be generated at "x-y".
"x" is the entry price.
"y" is the number of pips I am prepared to risk on each trade.
If I sell at "x", a stop order would automatically be generated at "x+y".
Does this function already exist, or is there a script that I could import that would execute this function?