The code was not hand written, it was created by a generator. There are a few errors, the code has to be rewritten the correct way in order for it to work. Maybe if you find someone here with the time on their hands, they might help you. Do not use Chat GPT or any other generators to code for you. They DO NOT WORK

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
Hello, I would like to use a simple expert with the AC signal.
I want to insert a Signal_Direction into this.
The Signal_Direction is intended to swap/mirror the input signal.
So the expert swapped/mirrored the purchase option with the ACSignal. Buy becomes sell and sell becomes buy. E.g. option 0/1 Same signal, different buy execution.
Alternatively, an automatic solution. A second ACsignal which works parallel and switches the first AC signal variable. basically 180°, a switch with the same ACSignal, to make the first right.
A double ACsignal solution. First work permanently wrong and the other is a right variable switch. Parallel
Another idea? Laugh...
Here is a template, unfortunately it doesn't work, see error. Marking on the right side
The exact name of the function is just an example.
Thanks and greetings Julian