An unhijacked helper for Evaluator's SAFT trading system

User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

An unhijacked helper for Evaluator's SAFT trading system

Post by SteveHopwood »

This is my second attempt at posting this EA. I seriously warn members against hijacking this thread as they did my original. Said members will not enjoy my reaction to said hijacking.

From here on, all suggestions to improve this EA are gratefully received.

Please visit http://www.forexfactory.com/showthread. ... ost1974715 for details of Eval's system.

The attached ea is intended to help with trade entry, management and exit of SAFT trades. It is a semi-auto trader, in that it responds to trendlines that you draw on your chart and OBV indi window.

In order to work with the trenlines, the ea has to know what they are called. The input that you use for your chart trendline is:
  • - ChartTrendLineName, defaults to 'ctrend' ( i.e. chart trend. The trendline you draw on your chart must have the same name.

    The OBV indi needs a 21 lwma and OBV has to break this in the direction of the trade. NeoTrader has produced a nifty indi that does the job for you. Download it from http://www.stevehopwoodforex.com/phpBB3 ... 048#p22048.

    I have coded colour as the ea's method of reading the trade direction, so your trendlines must be the appropriate colour:
    • - BuyLineColour for the downward sloping lines whose break you are trading long.
      - SellLineColour for the upward sloping lines whose break you are trading short.
    There is a fair bit of idiot-checking for when you forget something.

    So, imagine you want to trade long:
    • - drag a trendline onto your chart and name it 'ctrend', then colour it green (or whatever you have as your ea inputs).
    If you want to trade as soon as the market crosses the trendline, and is the correct side of its own 50 moving averave (turn off the ma by setting MaPeriod to zero) and OBV is the correct side of its moving average, set EveryTickMode to 'true', the default. To enforce a wait for the start of a new candle to ensure a clean break, set this to false.

    Initial stop loss is the previous fractal; tp is the stop loss * 2. I have not added a minimum stop level check yet; we shall have to see if this causes a problem. To make sure the take profit is exactly correct, the ea first sends the trade without sl/to, then first inserts the sl, calculates the tp and inserts it.

    Whether you use Stealth or not, the ea draws dotted tp/sl lines at the appropriate level. Select these and move them, and the tp/sl will move with the line.

    use EmailTradeNotification to receive an email alert when the ea sends a trade. Use SendAlertNotTrade to tell the ea to let you know of a setup, but not actually do the trade. If you enter the trade manually, the ea will manage it for you so long as the trade has the correct magic number.

    I have the ea running an eu trade and everything appears to run smoothly. No doubt bugs will emerge.

    The three exit strategies
    Eval has described this in his thread. You have to take care with your combination of inputs:
    • - Conservative
      • - set Conservative to true. The ea will send a tp with the trade, and a tp line coloured as you choose.
        - you need to manually set your breakeven/jumping/trailing stop inputs
      - Moderate
      • - set Moderate to true. The ea will draw the tp line at the correct point, but there will be no 'hard' tp..
        - manually set your breakeven point in the Breakeven inputs. At breakeven, the ea will close half the trade, so make sure your Lot size is divisible by 2. Moderate disallows RiskPercent generated lot sizing.
        - make your choice of jumping/trailing stop functions, but make sure the xxxTargetPips input is zero, so the ea can set this as equal to the stop loss.
      - Aggressive: works as does Moderate, without closing half the trade at breakeven and allows RiskPercent generated lot sizing.
The code for the exit strategies is complicated and likely to have some bugs.


Have fun.

:D
You do not have the required permissions to view the files attached to this post.
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
stevefx
Posts: 1
Joined: Mon Nov 28, 2011 2:08 am

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by stevefx »

Hi Steve,

I appreciate your efforts with this and I've taken an interest in this system over at FF.

One thing that I've noticed is that these trades seem to work out a lot better when the two trendline breaks are fairly closely synchronized in time. When one breaks then too much time passes before the other breaks the confluence gets lost between the indicator value and the price value. Its almost like it becomes a bit meaningless. So I was thinking that perhaps a function to specify maximum periods between breaks would be useful.

I've tried to illustrate what I mean in the following charts. They are of the same picture just two different time frames. One TF shows two breaks in synch, and the other has the price TL broken but not the OBV TL, and shows what often happens if too much time goes by before it does...

Anyway this would just make it a bit more set and forget, and probably insure higher quality trades..

Regards, Steve
You do not have the required permissions to view the files attached to this post.
spotdespot
Trader
Posts: 768
Joined: Sun Jan 22, 2012 11:38 pm

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by spotdespot »

"So, imagine you want to trade long:

- drag a trendline onto your chart and name it 'ctrend', then colour it green (or whatever you have as your ea inputs).
-- drag a trendline onto your OBV indi and name it 'ctrend', then colour it red (or whatever you have as your ea inputs)."

Steve - should this read:

"So, imagine you want to trade long:

- drag a trendline onto your chart and name it 'ctrend', then colour it green (or whatever you have as your ea inputs).
-- drag a trendline onto your OBV indi and name it 'otrend', then colour it green (or whatever you have as your ea inputs)."

Cheers,
Dave.
roger-write
Trader
Posts: 63
Joined: Sat May 19, 2012 10:34 am

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by roger-write »

Do you think there might be some value in adding an email alert to notify when price has crossed the TL, but OBV has not? Seems like in this case, price may still be evolving and the TL may need to be adjusted. This may also help with Stevefx's concern.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by SteveHopwood »

stevefx wrote:Hi Steve,

I appreciate your efforts with this and I've taken an interest in this system over at FF.

One thing that I've noticed is that these trades seem to work out a lot better when the two trendline breaks are fairly closely synchronized in time. When one breaks then too much time passes before the other breaks the confluence gets lost between the indicator value and the price value. Its almost like it becomes a bit meaningless. So I was thinking that perhaps a function to specify maximum periods between breaks would be useful.

I've tried to illustrate what I mean in the following charts. They are of the same picture just two different time frames. One TF shows two breaks in synch, and the other has the price TL broken but not the OBV TL, and shows what often happens if too much time goes by before it does...

Anyway this would just make it a bit more set and forget, and probably insure higher quality trades..

Regards, Steve
We can monitor this and see.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by SteveHopwood »

spotdespot wrote:"So, imagine you want to trade long:

- drag a trendline onto your chart and name it 'ctrend', then colour it green (or whatever you have as your ea inputs).
-- drag a trendline onto your OBV indi and name it 'ctrend', then colour it red (or whatever you have as your ea inputs)."

Steve - should this read:

"So, imagine you want to trade long:

- drag a trendline onto your chart and name it 'ctrend', then colour it green (or whatever you have as your ea inputs).
-- drag a trendline onto your OBV indi and name it 'otrend', then colour it green (or whatever you have as your ea inputs)."

Cheers,
Dave.
Yep. Thanks.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by SteveHopwood »

roger-write wrote:Do you think there might be some value in adding an email alert to notify when price has crossed the TL, but OBV has not? Seems like in this case, price may still be evolving and the TL may need to be adjusted. This may also help with Stevefx's concern.
The helper will only trade the chart trendline break if the OBV is already the correct side of the OBV trendline. We can monitor all this to see what additions we need.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
slipshod
Trader
Posts: 404
Joined: Tue Dec 27, 2011 9:14 am
Location: Australia

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by slipshod »

roger-write wrote:Do you think there might be some value in adding an email alert to notify when price has crossed the TL, but OBV has not? Seems like in this case, price may still be evolving and the TL may need to be adjusted. This may also help with Stevefx's concern.
Its always possible for a sudden shift in sentiment to break trendlines with no warning, which means the OBV will be left behind. Such is life - unfortunately no system can get onto every trade.
roger-write
Trader
Posts: 63
Joined: Sat May 19, 2012 10:34 am

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by roger-write »

I have a couple question about the EA:

1) I noticed that the SL line (actual SL value assigned to the trade) can keep shifting by a few pips up and down with each tick. Just curious why this might be?

2) Also, I noticed that you have some additional TP/SL lines. I assume these are if you want to manually move the TP/SL values. However, the are not lined up with the actual SL/TP values. Just curious if this was on purpose or if there is a problem with it?

3) I've noticed that, even though I have trailing SL to false, sometimes the trades close pre-maturely before hitting the TP. Can you think of why this would be? It is not the break-even plus 3 thing, though.

Thanks for all your contributions.
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Re: An unhijacked helper for Evaluator's SAFT trading system

Post by SteveHopwood »

The ea has a few problems that I need to solve at some stage.

:D
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Locked

Return to “Automated trading systems”