Trading script completely ignores conditional standard - page 2

 
Conor Mcnamara #:

When you deal with market orders

this is not correct, because you are dealing with Positions, so when you execute market orders, it should be:


Please at least first try and build a simplistic EA that follows rules correctly. If you successfully build a simple EA (as advised above) that follows the rules correctly, there will be far less caveats in a bigger project

I understand, thank you for all your help!

 
Soewono Effendi #:
NormalizeDouble

Thank you!

 

As your program seems to be an EA use the debugger to check where and why your program fails (a Script does not run in the debugger)

Beside that: There is almost nothing that has not been programmed for MT5. So searching is most probably a lot faster than coding!

Maybe you should start here:

Beginner's club: https://www.mql5.com/en/forum/330288   
https://www.metatrader5.com/en/metaeditor/help/development/debug
https://www.mql5.com/en/articles/654
https://www.mql5.com/en/articles/35
https://www.mql5.com/en/articles/2041
https://www.mql5.com/en/articles/272
https://www.mql5.com/en/articles/150

Beginner's club - Want to learn how to trade in and out?
Beginner's club - Want to learn how to trade in and out?
  • 2020.01.11
  • Genji Serizawa
  • www.mql5.com
I really wanna learn how to trade in and out. Start with the smallest positions and simplest systems and don't just gamble away your money. I find that it is great for gaining some experience and as time passes you will develop an eye for situations related to entries and exits