how should fix this error(int -name expected) while compiling this code and (unbalance parenthesis)
- 2022.07.30
- www.mql5.com
- 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...
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.
void OnTick() { //--- double TrailOrder(double Trailingstart,double Trailingstop) {You can not define a function inside another function.