SteveHopwood wrote:Be excited guys, be
very excited. My bath-lol was exceptionally profitable today.
This has to be semi-auto at the mo, because I never worked out how to divine the top/bottom of sq's boq in code. I will send him a pm asking him how I do this - unless some of the red-hot coders here can work this out. jb68, is your snippet an accurate representation of what sq does, leaving aside the historical stuff? I can use it if it is, and you get the credit.
More later when I have done some coding.

If you drop latest version of Sq's indi in an EA you will get a zero-division error. I remember a few month ago I removed something from it.. in orer to work with an EA. I attached modified version.
Here are the buffers.. you need to call:
// Breakout Box Buffers 0, 1 -> Not null when new CZ box appear
double BB0=iCustom(NULL,5,"sqDynamicBreakoutBox1",BoxLength,BoxTimeFrame,BoxRange,AutoBoxRange,AutoBoxRangeDailyATRperiod,AutoBoxRangeDailyATRfactor,BoxBufferPips,DaysBack,MinBarsClosedOutsideBO,MaxBreakoutTradesPerBox, 0,1);
double BB1=iCustom(NULL,5,"sqDynamicBreakoutBox1",BoxLength,BoxTimeFrame,BoxRange,AutoBoxRange,AutoBoxRangeDailyATRperiod,AutoBoxRangeDailyATRfactor,BoxBufferPips,DaysBack,MinBarsClosedOutsideBO,MaxBreakoutTradesPerBox, 1,1);
// BB2, BB3 -> Value of the last UP and DW lines from the last CZ box
double BB2= iCustom(NULL,5,"sqDynamicBreakoutBox1",BoxLength,BoxTimeFrame,BoxRange,AutoBoxRange,AutoBoxRangeDailyATRperiod,AutoBoxRangeDailyATRfactor,BoxBufferPips,DaysBack,MinBarsClosedOutsideBO,MaxBreakoutTradesPerBox, 2,1);
double BB3= iCustom(NULL,5,"sqDynamicBreakoutBox1",BoxLength,BoxTimeFrame,BoxRange,AutoBoxRange,AutoBoxRangeDailyATRperiod,AutoBoxRangeDailyATRfactor,BoxBufferPips,DaysBack,MinBarsClosedOutsideBO,MaxBreakoutTradesPerBox, 3,1);
//BB4 - BB5 - Actual SQ signals - No null when Buy / sell signal appear
double BB4= iCustom(NULL,5,"sqDynamicBreakoutBox1",BoxLength,BoxTimeFrame,BoxRange,AutoBoxRange,AutoBoxRangeDailyATRperiod,AutoBoxRangeDailyATRfactor,BoxBufferPips,DaysBack,MinBarsClosedOutsideBO,MaxBreakoutTradesPerBox, 4,1);
double BB5= iCustom(NULL,5,"sqDynamicBreakoutBox1",BoxLength,BoxTimeFrame,BoxRange,AutoBoxRange,AutoBoxRangeDailyATRperiod,AutoBoxRangeDailyATRfactor,BoxBufferPips,DaysBack,MinBarsClosedOutsideBO,MaxBreakoutTradesPerBox, 5,1);
As a nice and cool thing, it will build the CZ in your window so no need to drop the indicator into the window, just the EA . Unfortunately the EA itself had marginal gains for me, but using for a grid base should be way better due to martingale effect of the grid so I hope for the best.
You do not have the required permissions to view the files attached to this post.