Mohammad Rizal Bin Rahmat: So here is an example for a buy. I manage to get the rules to open order and take profit. so i'm trying to find a rules for the StopLoss. |
|
whroeder1:
Hi sir, if i set the SL on the order send, if price touches the price it will close order. That isn't what i needed. What i needed is if price close over the price which is the low or the high
|
I tried to put "iLow (NULL,0,1) or iHigh (NULL,0,1)"
But this if the price hit the SL price, it close order. What i wanted is the price close above or below the SL price
Mohammad Rizal Bin Rahmat:
I tried to put "iLow (NULL,0,1) or iHigh (NULL,0,1)"
I tried to put "iLow (NULL,0,1) or iHigh (NULL,0,1)"
But this if the price hit the SL price, it close order. What i wanted is the price close above or below the SL price
- Code a function in your EA, to draw a horizontal line.
- Then code a function (something like hidden stop loss), where if the price close above/below that horizontal line (https://docs.mql4.com/objects/objectfind), ea should close the order.
Mohamad Zulhairi Baba:
Meaning to say, when Order Send, it will place a horizontal line on the Low or the High. Then i code another function for the Stop Loss above or below the line correct? - Code a function in your EA, to draw a horizontal line.
- Then code a function (something like hidden stop loss), where if the price close above/below that horizontal line (https://docs.mql4.com/objects/objectfind), ea should close the order.
Hidden stop loss, any example? Not sure what is hidden stop loss
Mohammad Rizal Bin Rahmat:
I tried to put "iLow (NULL,0,1) or iHigh (NULL,0,1)" But this if the price hit the SL price, it close order. What i wanted is the price close above or below the SL price |
|
whroeder1:
I was actually looking at OrderOpenTime but i don't know how to quote OrderOpenTime to get the Low or High.
|
Mohammad Rizal Bin Rahmat:
I was actually looking at OrderOpenTime but i don't know how to quote OrderOpenTime to get the Low or High.
Can't help you much if you don't know how to code.I was actually looking at OrderOpenTime but i don't know how to quote OrderOpenTime to get the Low or High.
Perhaps try freelance service?
Mohamad Zulhairi Baba:
Can't help you much if you don't know how to code.
No worries. If everyone wants to learn but no guidance and was push to freelance, then no one is learning. I want to learn not to simply get someone to code for me. Thanks by the way
Can't help you much if you don't know how to code.
Perhaps try freelance service?
Mohammad Rizal Bin Rahmat: I was actually looking at OrderOpenTime but i don't know how to quote OrderOpenTime to get the Low or High.
| I just told you how. If you don't know how to code there is no common language for us to communicate. Learn to code it, or pay (Freelance) someone to code it. We're not going to code it for you. |
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
Hi,
Need a little help. Trying to find the code to use for the issues i have.
Example
So here is an example for a buy. I manage to get the rules to open order and take profit. so i'm trying to find a rules for the StopLoss.
Thank You
Here's my part of the order to be close. the one i indicate "BuyRetest" or "SellRetest" is one of the rules for stop loss. the one i requested is another rules for stop loss.
Anything to add up here?
Thank You