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
Sorry, I had written more but the realised that I had made a mistake, so deleted the rest.
I haven't looked at your 2nd code, but I believe that I see an error in the 1st
There is no need for this code at all, I think
And change
to this
Also, you should get into the habit of using and printing GetLastError(). I can guess that you are probably using fairly large lot sizes and the 2 brokers have different StopLevels. You will probably find that GetLastError() returns 130, meaning that the stop is too close to price.
EDIT: I wrote leverage, when I meant StopLevels
I do need to work on error messages. Might not need to ask questions on the forum. I think?
What are Function return values ? How do I use them ? - MQL4 forum
order accounting - MQL4 forum
Why is there NO Complete EA within the Code-Base? - MQL4 forum
Problems with a calculation - MQL4 forum
Problems with a calculation - MQL4 forum
What are Function return values ? How do I use them ? - MQL4 forum
Thanks for the suggestions. I will research this.
I think I would run into trouble using the Point variable because of the existence of 4 or 5 decimal brokers. Not sure if Point accounts accurately for this.
Actually, it may be more accurate to use TickSize, but mostly it is the same as Point
In this piece of code, you do not calculate value per pip, but value for 1 tick movement, so with 5 digit brokers, your stop will be 10 times bigger than you want
I think I would run into trouble using the Point variable because of the existence of 4 or 5 decimal brokers. Not sure if Point accounts accurately for this.
Have you read the FOUR links I posted?