I have no clue how to add an external variable or a hardcode to this EA that sets MaxTradesPerBar to 1. Since there is no MaxTradesPerBar setting in the code, when I test with every tick, I get tons of trades and orders on each bar that I don't want. I've read suggestions online but I don't know where to paste everything into the code (I'm new at coding). Your help is much appreciated!
I have no clue how to add an external variable or a hardcode to this EA that sets MaxTradesPerBar to 1.
but I don't know where to paste everything into the code (I'm new at coding).
And I would recommend you learn how to code. I paid for some programming and immediately after testing the new program I want to make changes. That's how I got started. I could see that programming was going to drain my account faster than making a bunch of bad trades. If you are completely new to the whole idea of programming in MT4. Start by figuring out where to save the different file types: expert advisor, script, custom indicator. Find the terminal window (Ctrl+T) and the expert tab. Once you have all that figured out try your hand at writing a few lines of code. See if you can get this to do what you expect it to do -- no surprises.
int something = 99;
Remember the Print function is your friend! You can use it for debugging programs and to figure out what a function is really doing.
Yes I consider it very rude that every day, one or usually more people ask 'code this for me' The world doesn't work that way.
If what you were asking for was "a couple of lines into the right places" then why couldn't you spend the effort to try to do it. You are just lazy and want things done FOR you.
Now had you tried and posted some code, then you would have gotten some help.
As it is I did help, I posted #2 what needed to be done. All you had to so was code it. Instead you became irate that you didn't get your way.
Most here are NOT programmers . . and nobody has asked you for money . . . you aren't asking for help to enable you to write code . . you are asking for someone to write the code for you. If you need that I suggest you go here: Jobs for MT4 & MT5 there are plenty of people that will write your code for you so you don't need to even try . . .
If you really have been trying to code this yourself why don't you show what you have tried so far . . . and explain in what way it isn't working.
You are still missing the point. Had you posted some type of attempt, you would have gotten the answer. Your request is about 5 lines of code. Not big at all.
Instead you keep bitch'n. You had several people state the same thing. Still you didn't post any code. So now I put you in the troll catagory.
Please do not feed the troll.
When you respond, you give the troll power. When you ignore the troll, he starves for attention and eventually dies.
If you are still out there, I can suggest a few code changes that will do what you're looking for. Let me know if you are still interested.
extern int SlowMA_AppliedPrice=0; // 0=close, 1=open, 2=high, 3=low, 4=median((h+l/2)), 5=typical((h+l+c)/3), 6=weighted((h+l+c+c)/4)
extern double BreakOutLevel=45; // Start trade after breakout is reached
extern int SignalCandle=1;
extern int MaxTradesPerCandle = 1; // limit orders to one trade per candle <<== add this line after this line ^