Few things that I would like to improve in this code:
1. The code executes at bar + X (X =10 in this case) but ignores if between 0-10 bars signal reversed. How I can force the code to execute if only original signal isn't reversed before arriving at execution bar.
2. Like to test impact of opening 1/3 of position whenever each of MADx is triggered
3. Lastly open/close position when all three MADs are in agreement (i.e >0 for entry and < 0 for exit).
Any help to incorporate the above will be greatly appreciated.
------------
CODE:
Please log in to see this code.
Size:
Color:
Size:
Color:
Thanks for the suggestion.
Size:
Color:
Here is what I got to work. The setup now waits till last 5 bars are > or < Zero.
I don't know if using & instead of && makes a difference!
(I couldn't figure out a way to incorporate solution proposed in #1. May be next time...)
I am sharing this for the community ;)
CODE:
Please log in to see this code.
Size:
Color: