Features 2 primary modes, depending on your risk profile. These options are available in the settings:
"Early Signals" ON (default):
Prints a "long" on grey to green transitions AND red to gray transitions.
Prints a "short" on green to grey transitions AND gray to red transitions.
Will not print back-to-back repeated positions (i.e. green → grey → red will only print the first green → gray "short" signal and not print "short" twice).
Rotates long and short positions with no delay.
"Early Signals" OFF
Will close trades, but never open new ones, when transitions to from any color to gray.
Open long: transitions gray to green.
Close long: transitions green to gray.
Open short: transitions gray to red.
Close short: transitions red to gray.
Does not rotate long and short positions back to back.
Can toggle on/off the 200EMA. Default is off.
Can toggle on/off short positions. Default is on.
minor aesthetic update for opening and closing shorts with "Early Signal" mode disabled to be consistent with the rest of the labels. Removed some redundant comments.
Original post also mistakenly had "100%" for position size. Here are some additional results