Thanks @gooly, I'm new to MQL4 so I don't see the right place to look for in the "Moving Average.mq4".
Can you direct me a little bit?
Thanks,
Ron
It is in the expert folder.
Play videoPlease edit your post.
For large amounts of code, attach it.
- "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
- You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
- Show your attempt.
Play videoPlease edit your post.
For large amounts of code, attach it.
- "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
- You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
- Show your attempt.
Well @WHRoeder as for your points:
1.I edited it. This is my first time here..
2.The use of high[1] is not relevant as it is not the right solution.
3.Nobody asked for coding anything , I just asked for a help on a specific and well define problem.
4.I showed my code ( in the relevant part), I guess that is an attempt, don't you think?
msrron: 3.Nobody asked for coding anything , I just asked for a help on a specific and well define problem. |
|
Still don't really know what you want. A buy-order has to have a SL that is more than MODE_STOPLEVEL*Point lower than the entry.
Do you know OrderModify(..) and the example in the reference?
I'll do the oposite for a buy order.
Regarding the MODE_STOPLEVEL*Point - I'll learn about it but I suspect that this can be only part of the solution.
Thanks
Ron
look up in the reference:
High[ iBarShift(NULL,0, OrderOpenTime() ) +1 ] + aFewPips;
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Here is a picture to Illustrate the issue (In the example (picture) there is a sell order):
Any Idea how to do that? The code below works fine If I use stoploss that is fixed.If I replace the stoploss with variables that are based on High or Low no orders are fired.
//+------------------------------------------------------------------+
Thank you