forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Technical Indicators → Customer indicator [request]

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 12

Topic: Customer indicator [request]

Not sure if this is the best place to put this, but here goes essentially was wondering if someone would be willing to create a custom indicator based on the formula below

p-((p-l)/(((p-l)×y) ))=x

Where
p = last peak (most recent high point)
l = last low (lowest point of last N bars)
y = a percentage value (user sets but default should be 25%)
x = exit point (if equal to or below sell at this point; if less than buy)

Would work together with a WTF opening indicator to determine if market is trending upwards.

I will attach an excel doc a bit later on which shows what i mean, if this is not possible could someone point me in the right direction.

Thanks in advance

Re: Customer indicator [request]

For the "last peak", does it need bars after it that are lower (like fractal indicator), or can it be the last bar, which is the highest in the last N bars (like Donchian Channel)? It sounds like a Donchian Channel, with a smaller inner channel that is a percentage of the Donchian.

If I take your formula and put into words, is it like this:

last peak - (bar range / (bar range * percent) ) = signal price

or the opposite direction, it would be:

last low + (bar range / (bar range * percent) ) = signal price

Then when it crosses into the inner channel, it's a buy (if the last peak/low was a peak), or it's a sell (if the last peak/low was a low). And, the same sort of logic if it's used a closing indicator.

I hope my guess is close. I'll check the Excel doc when it's available, an example would be great, it gives a target to check against.

Re: Customer indicator [request]

Here's a mockup screenshot I made, let me know if this is close:
http://forexsb.com/forum/misc.php?action=pun_attachment&item=464

Post's attachments

InnerChannel_Mockup.jpg 355.52 kb, 1 downloads since 2011-07-31 

You don't have the permssions to download the attachments of this post.

Re: Customer indicator [request]

That looks right, I personally only want to test it as an exit strategy for a 5 min chart using either a 15min or 30min WTF indicator to determine the trend. Would also use a permanent stop loss as backup protection.

anyway here is the excel doc, I have simplified it a bit since you are quite right in your first reply as to what is to be achieved.

thanks
Jason

Post's attachments

form.xlsx 17.81 kb, 15 downloads since 2011-08-01 

You don't have the permssions to download the attachments of this post.

Re: Customer indicator [request]

Hi Jason, try this version attached, let's see how this one works.

Expected:

  • * Close indicator only, used by itself

  • * 2 bands -- green line for long positions, red line for short position

  • * Percentage - default = 25%, so Long Band is 25% below last high, Short Band is 25% above last high. If you set it to 50%, they will be equal. If over 50%, the Long Band will be lower than the Short Band

  • * For Long positions, the bar Open must be higher than the Long Band to close (ie, crosses downwards)

  • * For Short positions, the bar Open must be lower than the Short Band to close (ie, crosses upwards)

The reason for the last 2 points is because if a long position opened below the Long Band, it would get closed as price moved upwards. This seemed opposite to me, it should only close if it's coming back down. So, it is very important to use a Permanent Stop Loss with this indicator. If not, it could open below the Long Band, then go down a very large amount.

Also, there is a check box for "Show High/Low Bands". If checked, it shows the Donchian bands in blue. If there are too many lines on your chart, uncheck the box, and it will only show the inner bands.

I have not tested this with FST. Before using, best to test on a demo account for some trades (probably 20-30) to be sure FST matches your FSB backtest.

Let me know if this is close to your request; if there are any bugs; or more to add.

Post's attachments

Donchian Close 1.cs 28.25 kb, 64 downloads since 2011-08-03 

You don't have the permssions to download the attachments of this post.

Re: Customer indicator [request]

Thankyou for that, will let you know how testing goes, and will also try to learn from this indicator to make my own.

Thanks again,

Jasonclaude

Re: Customer indicator [request]

Forgot to mention -- if you want to learn about coding custom indicators, look in Developer's Forum, there are a couple threads about how to code them and the source code for all of the built-in indicators.

Re: Customer indicator [request]

Replaced percentage to shrink bands with vertical shift to widen.

Post's attachments

Donchian Shift Close.cs 28.29 kb, 63 downloads since 2011-10-07 

You don't have the permssions to download the attachments of this post.

Re: Customer indicator [request]

Thanks for that Krog. I thought I would give you some feedback on how I got on with the new Donchian Shift Close trailing stop.

The logic works well but I found that it only really gave good results on large time frames. Here is about the best strategy I came up with:-

Strategy name: EURUSD1dayDSC
Forex Strategy Builder v2.64.0.0
Exported on: 18/10/2011 6:08:09 AM

Description:
Automatically generated on 11/10/2011 4:13 PM.
Out of sample testing, percent of OOS bars: 50%
Balance: 20045.00 USD (18/05/2011 11:25 PM  Bar: 4852)

Market: EURUSD 1 Day
Spread in pips: 20.00
Swap Long in pips: 2.00
Swap Short in pips: -2.00
Commission per lot at opening and closing in pips: 0.00
Slippage in pips: 10

Maximum open lots: 100.00
Entry lots: 5.00
Adding lots: 1.00
Reducing lots: 1.00

Intrabar scanning: Not accomplished
Interpolation method: Pessimistic scenario
Ambiguous bars: 6
Tested bars: 5652
Balance: 424555 pips (434555.00 USD)
Minimum account: 0 pips (10000.00 USD)
Maximum drawdown: 34160 pips (34160.00 USD)
Time in position: 15 %

[Strategy Properties]
     A same direction signal - Does nothing
     An opposite direction signal - Closes the position
     Permanent Stop Loss - None
     Permanent Take Profit - 1400
     Break Even - None

[Opening Point of the Position]
     Bollinger Bands
     Enter long at the Upper Band
     Smoothing method  -  Smoothed
     Base price  -  Close
     MA period  -  60
     Multiplier  -  2.57
     Use previous bar value  -  Yes

[Opening Logic Condition]
     Enter Once
     [All]   Enter no more than once a week

[Closing Point of the Position]
     Donchian Shift Close
     Exit long at the Lower Band
     Base price  -  High & Low
     Period  -  11
     Shift  -  1
     Vertical Shift  -  5
     Use previous bar value  -  Yes
     Show High/Low Bands  -  Yes



Be careful, there is no stop loss!

Re: Customer indicator [request]

Hi SpiderMan,
I get the same impression too. If the time frame or lookback is too short, the indicator is very noisy, you often get stopped out in the same bar as entry.
With wider time frames, you give the price enough chance that only the 10-15% percentile outliers push the bands.

There are also some difficulties you sometimes get with this type of indicator. For example, it can never open outside the band -- because, by definition, the band is the highest or lowest price, so the band will always expand to include all price action. I'm worried about that, it could be a bug opportunity.

How is the equity curve? Does it look unbelievable? If it goes straight up, there could be a bug in the indicator. A more believable curve has wins and losses mixed, some ranging areas, and probably a couple of bad weeks.
thanks

Re: Customer indicator [request]

The equity curve looks fine.

http://img687.imageshack.us/img687/4822/snap20111018065527001.png

Re: Customer indicator [request]

I use 5 minutes, took a quick look with 1 day, nothing jumps out at me like a bug. How about trades that open and close in the same bar? Those usually get my spidey sense tingling, they need careful consideration to be sure they are not bugs. But ultimately, if demo real-time trading trades and the FSB backtested trades match, that tells if the indicator is working correctly or not.
thanks
krog

Posts: 12

Pages 1

You must login or register to post a reply

Forex Software → Technical Indicators → Customer indicator [request]

Similar topics in this forum