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

Martinscaling and stuff
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1469
Page 1 of 1
Author:  Radar [ Sat Feb 09, 2013 4:53 am ]
Post subject:  Martinscaling and stuff

Hey Gang,

Martinscaling

I've been thinking of how to maximise profits from trends whilst minimising the initial risk, and came up with this method of scaling in a few weeks back...

This is based on a 10 pip JumpingStop.

When locked-in cash profit of all longs >= twice (or triple, or quadruple, etc) the cash value of your jumping stop, then start adding long trades, at jumping stop pips apart, with a stoploss of 12 pips, BE of 12 pips, and BEP of 2 pips....

what we're trying to do is align the stoploss of all trades to the same price, (except for the 2 most recent trades, which have their stoploss 2 pips behind the rest). This way, we ensure that our winners top up our balance before the losers are hit.

Same for shorts...

To take it another step, set SILevel (Scale-In Level), to 0, and test against the following...

If locked in cash profit of all longs >= 2 * cash value of BaseLots * MathPow(2, SILevel) * Jumping Stop, then enter a long trade of Baselots * MathPow(2, SILevel). BaseLots is the lotsize you start trading with, which, in my case, is always 0.01 lots.

Same for shorts.

You could put that in an incremental loop, (though, I've read that running multiple EA's & indicators using incremental loops tend to confuse each other), and, when the test is failed, use the last successful test, or, you could have the user input "MaxSILevel" and run a decrimental loop starting from there. Once SILevel is greater than MaxSILevel, continue scaling in at MaxSILevel.

I've attached a text file, which, hopefully, will show you what I mean in a much better way than I've explained it here.

So, starting from your initial trade, at BaseLots size... At each jump of your stoploss, you ask, "Will half of my winnings from this trade pay for a losing trade with double the lots?" If yes, then enter your scale-in trade at double lot size. If no, then ask, "Will half of my winnings from this trade pay for a losing trade of the same lot size?" Again, if yes, enter your scale-in trade at BaseLots size. If no, then wait until the next jump in stoploss, and ask the same questions again... Rinse and repeat ;)

Instead of risking half your locked-in profit, you can risk a third, a quarter, a fifth, etc... Whatever you're comfortable with.

If anyone that understands this can explain it clearer, PM it to me, and I'll edit this message with that :)

Have fun!

Radar =8^)

edit: 13 Sept 2013 Built it over the past month :) Lookie here... http://www.stevehopwoodforex.com/phpBB3 ... 555#p75555
Author:  Radar [ Sat Feb 09, 2013 4:55 am ]
Post subject:  Dynamic Jumping Stops.

Hey Gang,

Dynamic Stoplos & JumpingStops.

I've been reading VM9999's Crossfader thread, see http://www.stevehopwoodforex.com/phpBB3 ... f=5&t=1417 and the issue of when to stop adding trades came up, which brought me to this...

Use your favourite momentum indicator on the timeframe you're trading, or a lower timeframe, to help determine your jumping stoploss... The higher the momentum, the shorter your stoploss, the smaller your jumping stops, and the more scale-in trades you can enter. As momentum decreases, increase your stoploss and jumping stops, and eventually stop scaling in.

I figure that with higher momentum, there'd be less retracements, and they'd be smaller.

Maybe use momentum with ATR to determine JSL?

Any and all ideas are welcome :)

Have fun!

Radar =8^)

P.S. I just read some interesting stuff from Lifesys about using ADX as a filter, here... http://www.stevehopwoodforex.com/phpBB3 ... 9&start=30 It's well worth the look :)
Author:  Radar [ Sat Feb 09, 2013 5:15 am ]
Post subject:  Promoting Trades To Higher Timeframes. (This is a long read)

Hey Gang,

Promoting Trades To Higher Timeframes.

I've had this one stuck in my head for around a year now, and comes from 3 basic facts...

1. A range on a high timeframe is simply a series of trends on a lower timeframe.

2. A retrace on a higher timeframe is a trend on a lower timeframe.

3. A retrace on a lower timeframe is just a blip on a candle of a higher timeframe.

I guess that's why we use smaller stoplosses on lower timeframes, eh? ;)

For most of the time I've been thinking about this, I thought it would be simple to do... Who'd have thunk that MegaDopes would have left out such a simple thing from Empty4 as the ability to change magic numbers or comments?!

Anyways...

Grab your most successful trend trading EA's for each timeframe... It could be a single EA that works on all timeframes, or a bunch of them...

Add the following to each...

1. User Inputs...

Delay: Default 500. Wait how long, (in milliseconds), before starting EA. Used to stagger-in each timeframe's EA, so that they have enough time to verify their control files, then import and export any trades that they had control of on a previous run of the EA. The higher the timeframe you put the EA on, the higher the delay, to give lower TF's EA's time to do their thing.

BaseLots: (Replaces any MoneyManagement or Lots input). Defaults to broker's MinLots setting.

ManageTradesOnly: Defaults to true. Hell, I might want to manage a trade on the weekly timeframe, but I sure don't want the DD from opening a trade on it.

ScaleIn: Defaults to false. Do you want to scale-in on winning trades?

JSLMultiplier (Needs a better name): Defaults to 2. How much profit do you want locked in, (calculated as JSLMultiplier * cash value of JumpingStop) before scaling-in, (& doubling up).

MaxSILevel: Defaults to 3. Minimum is 0. Used in BaseLots * MathPow(2, SILevel) to determine lotsize of scale-in trades.

PromoteTrades: Defaults to false. Ignores the following inputs, unless set to true.

ImportTrades: Defaults to false. Ignores the following inputs, unless set to true.

ImportMagic: Magic number of the EA you're importing from.
ImportTimeFrame: Timeframe of the EA you're importing from.
ImportMagic and ImportTimeFrame are combined with Symbol & Longs/Shorts to get part of import file name. e.g. Longs from E/U 1M to E/U 5M:- 12345_EURUSD_1_Longs_To_54321_EURUSD_5.csv

ExportTrades: Defaults to false. Ignores the following inputs, unless set to true.

ExportMagic: Magic number of the EA you're exporting to.
ExportTimeFrame: Timeframe of the EA you're exporting to.
ExportMagic and ExportTimeFrame are combined with Symbol to create part of export file name.
e.g. Shorts from E/U 5M to E/U 15M:- 54321_EURUSD_5_Shorts_To_67890_EURUSD_15.csv
================================================================

2. A management control file verification/reconstruction routine.

3. When the EA enters a trade, it should write the trade's details one of two management control files... MagicNumber_Symbol_Period_Longs.CSV, or MagicNumber_Symbol_Period_Shorts.CSV. The details required are TicketNumber, OpenPrice, Lots, StoplossPrice, EntryType (I for initial trade, S for scale-in trade) and JumpCount (0), (number of times your jumping stop has jumped after breakeven).

The reason for EntryType and JumpCount? I'll get to that in a moment ;)

4. Only manage trades that are in the EA's control and import files. At each jump of stoploss after breakeven, modify StopLossPrice, and increment Jumpcount.

5. A trade import function. Cut trades' info from the previous EA's export file, (this EA's import file), and paste into this EA's management control file when the EA has entered a trade in the same direction, and it has hit BE or a higher JSL point- or - if ManageTradesOnly is true, when there is enough momentum in the same direction.

6. A test to see if you can afford to begin scaling in. (See Martinscaling, above). Ignored if ManageTradesOnly is true.

7. A test to see if there's enough momentum to make it worth scaling in. Ignored if step 5 fails, or ManageTradesOnly is true.

8. A trade export function. Export trades *after* scaling in. When exporting trades, change EntryType to P (promoted), and JumpCount to 0.

As you can see from the text file attached to the first post, once your initial trade's jumping stop has moved six times, the martinscaling effect is self-perpetuating, and so from the seventh jump onwards, you have to close the oldest trade, or you'll end up with your doubling effect eventually becoming a quadrupling effect, then octupling, etc, (which is fine if you have no limit to the number of lots in play at once... My broker limits me to five lots, though)...

So, after the sixth jump of the initial trade, (and after you've entered your fifth scale-in trade), you begin exporting the oldest trade each jump to the next timeframe up. Since an exported trade's stoploss doesn't move until it is imported by the EA on the next timeframe up, the oldest trade still adds its profit to cover the potential loss of the most recent scale-in trade.

On the new timeframe, after imported trades have their SL moved three times (after breakeven), they will have kickstarted the martinscale process enough that they, plus initial trade of that timeframe, can be exported to the next level.

Examples of management control filenames, & export/import filenames...

12345_EURUSD_1_Longs.csv
12345_EURUSD_1_Longs_To_54321_EURUSD_5.csv
54321_EURUSD_5_Longs.csv
54321_EURUSD_5_Shorts.csv
54321_EURUSD_5_Shorts_To_67890_EURUSD_15.csv

As to how to code any of this, all I can say is, "Women's magazine... No Idea" (It's an Aussie magazine, that has no idea, not women).


Have fun!

Radar =8^)
All times are UTC Page 1 of 1