![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Could someone show me how to make this code shorter? How to use for cycle for this?
Would like something like this, but don't know how to change variable names.
Could someone show me how to make this code shorter? How to use for cycle for this?
Would like something like this, but don't know how to change variable names.
You cannot initialize an array with a list of inputs, due to limitations of MQL. (Only constant expressions like { 2, 5, 3.1 } will do.)
But since you need to convert doubles to strings anyway you can use StringFormat. The interesting thing about this function is it accepts an arbitrary number of arguments.
With the help of StringSplit it can be used to create an array on the fly:
Been trying to figure this out for too long now, i need help.
The envelope values aren't corresponding with rsiArray[0] or to any value i see on the charts and i just cant figure out why.
Any ideas?
Thanks
EDIT: (fixed) ok, all i needed to do was restart mt4 and the code worked fine.
I've spent hours trying to get an EA/utility to work correctly and made several changes until my brain is numb. Attached is a preliminary version and I'll improve it once I get past the hurdle of basics working correctly which is to sound an alarm when an open buy/sell order is added and a different alarm when an open order buy/sell is closed. This version sometimes works and sometimes doesn't so unreliable at this point.
Hi guys, I'm new. I want to do a very simple edit on this indicator
How and where do I just simply put in the Description box of the Horizontal Line, the word, Alert_ ?
for it to automatically appear?
Looking forward your response
Can anyone Help me to code this. Putting Rectangle as a high and low of the last 3 months as shown thank you
someone help with stoploss on previous ma cross
Hi,
I have idea. But i don't know mq4 code much.
Previous high is lower than 2nd previous high, then buy pending order at previous high * 2% or 1% and when price at current candle touch that order buy.
Previous low is higher than 2nd previous low, then sell pending order at previous low * -2% or -1% and when price at current candle touch that order sell.
Any period. No target No stop loss. Trailing stop loss like opposite.
Grateful to anyone, who can make mq4 code. I need help. Only MT4.
Hi ...
Can you make an Expert for this strategy please
Reinforcement Expert
Settings :
1. Option: Sell only / Buy only
2. TP: 50
3. Sl: 00
4. Step: 150
5. Start Lot: 0,1
6. Multiplication: 1.2.4.8.16… ..
7. Total orders: 100
8. Magic Number: 111111
The method of work :
1- Opening a position at the start automatically by the specified lot size.
2- Change Tp for all trades on each reinforcement.
According to the following equation: Tp for the last double position covers us all floating loss + profit of the last position.
3- Return to the beginning lot.
Hi ...
Can you make an Expert for this strategy please
Reinforcement Expert
Settings :
1. Option: Sell only / Buy only
2. TP: 50
3. Sl: 00
4. Step: 150
5. Start Lot: 0,1
6. Multiplication: 1.2.4.8.16… ..
7. Total orders: 100
8. Magic Number: 111111
The method of work :
1- Opening a position at the start automatically by the specified lot size.
2- Change Tp for all trades on each reinforcement.
According to the following equation: Tp for the last double position covers us all floating loss + profit of the last position.
3- Return to the beginning lot.
Post it as a job in Freelance section.