Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
One little tweak: put the plots in a block that does not execute, then you don't need the noplots, and none of the statements ever execute, but you still get the plots in the configuration. Using CurrentBar = 0 is sneaky, but works.
Not sure what level of detail you're aiming for, but here are a few ideas....
if O = C then color = GetPlotColor(11);
if H[3] < H[2] and L[3] < L[2] and H[1] < H[2] and L[1] < L[2] and C < C[1] then color = GetPlotColor(12);
if H[3] > H[2] and L[3] > L[2] and H[1] > H[2] and L[1] > L[2] and C > C[1] then color = GetPlotColor(13);
if H[1] <= H[2] and L[1] >= L[2] and C > H[2] then color = GetPlotColor(14);
if H[1] <= H[2] and L[1] >= L[2] and C < L[2] then color = GetPlotColor(15);
Plot11(C, "Doji");
Plot12(C, "RevShort");
Plot13(C, "RevLong");
Plot14(C, "IB-BreakLong");
Plot15(C, "IB-BreakShort");
Plots 12 thru 15 assume trade-plans that require the signal bar to close before becoming a valid trigger (painted).
These do not allow for trade-plans that only require the trigger be broken at anytime during the formation of the current bar. Will the code allow the painting of the current bar, based on breaking a trigger point, prior to the bar closing?
Something similar could be done for the break of the low of a Bearish Engulfing or of the high of a Bullish Engulfing.
If you aren't interested in painting trigger bars, then for the reversal pattern you could just paint the third bar of the three bar pattern....
if H[2] < H[1] and L[2] < L[1] and H < H[1] and L < L[1] then color = GetPlotColor(12);
if H[2] > H[1] and L[2] > L[1] and H > H[1] and L > L[1] then color = GetPlotColor(13);