View Single Post
  #9 (permalink)  
Old 11-22-2006, 05:35 AM
cubesteak's Avatar
cubesteak cubesteak is offline
Senior Member
 
Join Date: Jul 2006
Location: Southern California
Posts: 163
cubesteak is on a distinguished road
Thumbs up Interesting thoughts that echo some of my own...

This is an excellent discussion to have - thank you for starting it!

First off - i think you were looking for what the minimum TS value is. If I understand what you are looking for, you can get it with:

MarketInfo(Symbol(),MODE_STOPLEVEL);

Secondly, this may be a moot point with EA separation, but you were discussing saving values verses dynamic calculation. While dynamic calc is always easier, it is very wasteful in terms of processing time. Yet, array access is very quick - so I think the best thing would be a 2 dimensional array of trades:

MyTrades[][n]; Where 2nd dim is {ticket, position, SL price, TS price, etc..}

The EA then simply has to compare values at close time, rather than computing them - these can be computed immediately after the trade, because it is unlikely we'll need to close then, so we have some "ticks" to spare so to speak. It could save a bundle of processing time.

You mentioned a 5 second EA cycle - was that serious, or were you just using an example? That seems huge to me.

I love the idea of the TS replacing a traditional TP - this is what I prefer to use myself. The value as you mentioned, is that it eeks out a few more pips in most situations. The interesting discussion comes in when it is set?

If you normally have a TP of say 20 do you set a 5 pip TS when you hit 20 (which of course has the potential to loose the 5 pips) or do you set the 5 pip TS at 25 so that your true potential profit is 20, but you are risking that profit for 5 extra pips.

This is where tick data optimization is a must, and it should be frequently updated for the most recent periods (ala Phoenix I believe).

Mauro's e.trailing has the ability to set these already (the levels, not the testing! ) in the BreakEven.Lock.Pips and the Start.Trail.After.BreakEven. This is primarily used in your #4 scenario (if I'm winning, don't loose), but I use it more for the SL replacement for TP.

If I want a 20pip SL, I'll set Start.Trail.After.BreakEven to true, BreakEven.Lock.Pips to 20 and the SL value of 5. This means that once I'm 25 pips in profit, my SL is moved to the 20 pip profit mark, and will now trail 5 pips behind. It works very nicely. You can always split the difference too, meaning lock pips of 22 or 23 - that means you need to be 27 pips in profit to set the 5 SL, but it also ensures more actual TP (17 compared to the 15). Obviously, these are just broad numbers to work with.

Mauro originally designed e.trailing as a separate EA, but I changed it into an include file for my purposes. You are making me doubt that choice.

Again, this is an excellent discussion, and I'm pleased that you've chosen to ruminate about it openly.

Very best regards,
CS
__________________

Join the MultiBroker M1 and TICK Data Bank Project

Imagine 90-99% modeling quality in MT4 back testing with free data from your broker!
Come see our current list of covered brokers.
Reply With Quote