
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
How do I insert in OrderSend TP, Sl, so that SL contains the High of the previous candle and TP of the Low of the previous candle + TakeProfit ?
For example, like this:
In addition, please note that the 4th parameter of the OrderSend() function, the price at which the BUY LIMIT order will be set, must be lower than the current price. And for a SELL LIMIT order, this parameter should be higher than the current price. If you need to set a BUY pending order above the current price, you should use order type OP_BUYSTOP. Read the help on how STOP orders differ from LIMIT ones.
I would also add a check to see where the current price is at the moment of placing the order.
If I have understood your idea correctly, it should look like this
if the current price is below the minimum of the previous candle, then we will place an SELL LIMIT order at the minimum of the previous candle;
If the current price is above the maximum of the previous candle, then BUY LIMIT on the maximum of the previous candle.
Maybe you should get a service job?
So the topic is for freeloaders).
Greetings, can anyone tell me how to write a function, I've created a topic and there's silence... I guess everyone's here.
https://www.mql5.com/ru/forum/43095
Thanks in advance.
For example, like this:
In addition, please note that the 4th parameter of the OrderSend() function, the price at which the BUY LIMIT order will be set, must be lower than the current price. And for a SELL LIMIT order, this parameter should be higher than the current price. If you need to set a BUY pending order above the current price, you should use order type OP_BUYSTOP. Read the help on how STOP orders differ from LIMIT ones.
I would also add a check to see where the current price is at the moment of placing the order.
If I have understood your idea correctly, it should look like this
if the current price is below the minimum of the previous candle, then we will place an SELL LIMIT order at the minimum of the previous candle;
If the current price is above the maximum of the previous candle, then BUY LIMIT on the maximum of the previous candle.
How do I make my EA work only on Monday?
If you have a good strategy and are willing to share it, I can write an EA. I invite you to discuss it either publicly or in private messages.
How do I make my EA work only on Mondays ?
You need the DayOfWeek() function. Returns the sequence number of the day of the week. For Monday it will be 1. For more details, please read the help.