stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

StackManV2
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4564
Page 3 of 4
Author:  Radar [ Sat Mar 05, 2016 6:36 pm ]
Post subject:  StackManV2

For the coders...

A funny thing happened on the way to using horizontal lines... I was using

Code: Select all

         price = ObjectGetValueByShift(<LineName>, 0);
...but found that it doesn't work with horizontal lines

To be able to get the price of either horiz lines, or trend lines, I had to do this...

Code: Select all

         ResetLastError();
         price = ObjectGetValueByShift(<LineName>, 0);
         int err = GetLastError();
         if (err == 4205) price = ObjectGetDouble(0, <LineName>, OBJPROP_PRICE);
...which works like a charm :)

Have fun!
Radar =8^)
Author:  Cubic [ Sun Mar 06, 2016 1:31 am ]
Post subject:  StackManV2

Radar » Sat Mar 05, 2016 10:25 am wrote: What I'll most likely end up doing is using Squalou's StairStep BreakOut indicator as a guide for placing my lines when price is going sideways, and use either a pitchfork or equidistant channel as a guide for the trends.
This reminds me that I should spend some more manual chart time.
Cheers,
Cubic
Author:  squalou [ Thu Mar 10, 2016 2:44 pm ]
Post subject:  StackManV2

just dropping by...

Radar, please feel free to use my sqDynamicBreakoutBox indicator for your purpose, you can mod it as you wish any time.

I find it quite satisfactory sometimes, but it is still not "flexible" enough in some cases;
Even with the DailyATR-based price range parameters (AutoBoxRangeDailyATRperiod and factor), we are still having some hard times trying to catch a decent breakout without being chopped a few times...
It definetely has (and will always have) some room for improvements!

"Have fun"

Sq.
Author:  Radar [ Thu Mar 10, 2016 3:17 pm ]
Post subject:  StackManV2

Hey Squalou,
squalou » Fri Mar 11, 2016 1:14 am wrote:just dropping by...

Radar, please feel free to use my sqDynamicBreakoutBox indicator for your purpose, you can mod it as you wish any time.
Thank you :) It is very much appreciated :)
I find it quite satisfactory sometimes, but it is still not "flexible" enough in some cases;
Even with the DailyATR-based price range parameters (AutoBoxRangeDailyATRperiod and factor), we are still having some hard times trying to catch a decent breakout without being chopped a few times...
It definetely has (and will always have) some room for improvements!

"Have fun"

Sq.
I'm seeing the same thing, and even more chop when I enable trading within the range... Still, when you get a buy at the bottom of the box, and watch it scale-in, then break out through the top of the box, It's pretty damn good! :)

Take care,
&
Have fun!
Radar =8^)
Author:  Radar [ Thu Mar 10, 2016 8:58 pm ]
Post subject:  StackManV2

Hey Gang,

I have modded Squalou's sqDynamicBreakoutBox_v1-13_R1 indicator so that it will draw the Stop lines (and the Limit lines, if enabled), and move them when a new box is formed.
Here is an explanation of the settings...

BoxLength: Number of bars that fall within BoxRange before drawing the box.
BoxTimeFrame: TimeFrame in minutes, (e.g. 240 for H4). 0 = Chart timeframe.
BoxRange: fixed box range (in pips) , when AutoBoxRange is false
AutoBoxRange: when true, will use AutoBoxRangeDailyATRfactor*daily_ATR_value as the BoxRange value;
AutoBoxRangeDailyATRperiod: Average Daily Range over how many bars?
AutoBoxRangeDailyATRfactor: Multiply the ADR by this amount (can use decimals).
BoxBufferPercent: Calculates the distance to place BuyStop & SellStop lines, as a percentage of BoxRange. (Changed from fixed pip size for SM_Mod)
DaysBack: Look back how many calendar days? 0=full history
// CAUTION when setting DaysBack to 0: with large history data, this is likely to lock-up Empty4 for a few dozen seconds per chart!
MinBarsClosedOutsideBO: Number of bars to close outside the BO levels to signal trades; 0 means "enter immediately on Breakout"
MaxBreakoutTradesPerBox: Maximum number of "trades" shown for each historical Box; 0 to ignore signals (no stats!), 999 or more to show+count all;
Trade_Inside_Box: Enables/Disables drawing the SellLimit & BuyLimit lines. (Added setting for SM_Mod)

TP1 to TP9 are factors of BoxRange, and are based on "fib lines"
when a TP is >=20, it is considered as FIXED PIPs, <20 is a factor of the box size (EXCLUDING bufferpips);

ShowTPLevelsOnLastBoxOnly: To limit the TP levels to the last Box only
TP_is_pips_above: Any TP input above this value is considered as a FIXED PIP value, below is a FACTOR of the box size (including bufferpips);
SL: SL Factor, or fixed pips if greater than "TP_is_pips_above";

It's available in the first post. Have a play with it on a live/demo chart.

Have fun!
Radar =8^)
Author:  Radar [ Thu Mar 10, 2016 9:08 pm ]
Post subject:  StackManV2

Hey Gang,

Added new settings...

Enable_BreakOutBox: Enables trading using breakout method using either horizontal or trend lines.
BarsClosedOutsideBox: How many bars need to close outside the lines before entering a trade?
DeleteChannelOnBreakOut: Obvious... Don't know why I typed it here.
Trade_Inside_Box: Play the range whilst waiting for a breakout?
The following settings are only applied to trades when we're trading inside the box...
Bob_StopLossTargetPips: Initial StopLoss of trades entered inside the box/channel (may be changed to a percentage entry).
BobBE_Percent: BreakOutBox/Channel BreakEven, as a percentage of BoxSize (50 = 50%)
BobBEProfit_Percent: BreakOutBox/Channel BreakEvenProfit, as a percentage of BoxSize (10 = 10%)
BobJumpStop_Percent: BreakOutBox/Channel JumpingStop, as a percentage of BoxSize (50 = 50%)

The standard trade management settings are applied once price moves outside the box/channel...
You will see the feedback change as price moves into and out of the breakout zone, but current trades' stoploss isn't moved until price moves the correct distance according to where the trade was entered (e.g. BE at 50 pips for a breakout trade, or 20 pips for a range trade).

A little bit about the Limit lines...
If Enable_BreakOutBox is false, then the Sell and Buy Limit orders work as normal, i.e. price moves up and hits the SellLimit line, and a sell market order is sent instantly, with the opposite for the BuyLimit line.

If, on the other hand, Enable_BreakOutBox is is true, and Trade_Inside_Box is also enabled, then the Limit lines are used a little differently... Price has to close above the SellLimit line, then hit it from above (exactly like a SellStop), with the opposite for the BuyLimit line.

Squalou has graciously allowed me to post my modded version of his DynamicBreakoutBox indicator, which will draw the Stop lines (and the Limit lines, if enabled), and move them when a new box is formed. Explanation of the settings here.

Have fun!
Radar =8^)
Author:  Radar [ Wed Mar 23, 2016 9:43 am ]
Post subject:  StackManV2

Hey Gang,

I have further modified Squalou's DynamicBreakoutBox indicator so that it now simulates BreakEven, BreakEvenProfit, JumpingStop, and TrailingStop (with an option to enable/disable instant trailing), and TakeProfit.
This took a while for me to do, and I lost count of how many times I broke things to the point that I had to start from scratch again :(
I also removed the Fib levels for now, but will re-instate them when I can work out how to implement Fib-based jumping stops, and how to best swap between Fib-based and fixed sized jumping stops.

The next stage will be to add historical scale-in "trades" using the same logic as the EA, and to do the accounting for those "trades". I may have to re-write the whole trade & accounting logic to enable the indicator to mirror the EA completely. We'll see what we see when we take a look-see.

Have fun!
Radar =8^)
Author:  taipan [ Fri Sep 09, 2016 3:25 am ]
Post subject:  StackManV2

Hi Radar,

I have just played with StackMan2 EA but it crashed my Empty4 2 times after loading into Empty4 latest build 1010.

No errors have been found in expert tab.

So no chance to test it to manage trade.

Thanks for the interesting EA.
Author:  Radar [ Fri Sep 09, 2016 10:57 am ]
Post subject:  StackManV2

Hey Taipan,
taipan » Fri Sep 09, 2016 1:55 pm wrote:Hi Radar,

I have just played with StackMan2 EA but it crashed my Empty4 2 times after loading into Empty4 latest build 1010.

No errors have been found in expert tab.

So no chance to test it to manage trade.

Thanks for the interesting EA.
I've been using SMv2 on my live account for around six weeks straight now (I didn't do much manual trading before this run), and haven't had a problem with it so far... I updated to 1010 last weekend.

Do me a favour... Try it again, and save the set file... I should be able to see why it's tripping up... Also, where is your Empty4 installed? Windows' UAC may be wreaking havoc :(

Have fun!
Radar =8^)
Author:  taipan [ Fri Sep 09, 2016 11:37 am ]
Post subject:  StackManV2

Hi Radar,

I have loaded up with GarySuperCSSv1.4 with other indis on 28 Pairs. I could not ever load it up and how to get the set file!.

I have just tested it on less clutter charts and it works perfect.

Now the problem is due to Empty4 bug. May be due to memory leak.

Anywhere you EA tested good and thank you for that.

Forget for the "bug" due to my fault.
All times are UTC Page 3 of 4