
Discover new MetaTrader 5 opportunities with MQL5 community and services
- 2022.07.30
- www.mql5.com
MQL5: language of trade strategies built-in the MetaTrader 5 Trading Platform, allows writing your own trading robots, technical indicators, scripts and libraries of functions
- Learn how to design a trading system by Chaikin Oscillator
- FileWriteArray
- ExpertRemove
That code seems so messed up! Why declare a function "TrailOrder" inside the OnTick function and why call OrderStopLoss before selecting an order...That doesn't make sense to me.
The error about int can be fixed with "int MagicNumber = 11111;"
OnDeinit function should have an argument...
Nelson3056:
No easy fix - I suggest you generate a new file and then start pasting small sections of code across, compiling/fixing as you go.
I suppose you try different styles from settings. With some, the brackets are in a rectangular order meeting on the top left corner of the code block they belong to (Java or Google Style for example). For some people it is easier than counting ten brackets in a straight line over and over.
Tobias Johannes Zimmer #:
I suppose you try different styles from settings. With some, the brackets are in a rectangular order meeting on the top left corner of the code block they belong to (Java or Google Style for example). For some people it is easier than counting ten brackets in a straight line over and over.
I suppose you try different styles from settings. With some, the brackets are in a rectangular order meeting on the top left corner of the code block they belong to (Java or Google Style for example). For some people it is easier than counting ten brackets in a straight line over and over.
Thanks really appreciate your help
void OnTick() { //--- double TrailOrder(double Trailingstart,double Trailingstop) {You can not define a function inside another function.
Thanks for the help.

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