Breakout Strategy

Strategies are published here.

Moderator: admin

Re: Breakout Strategy

Postby Hug Coder » Wed Feb 01, 2012 8:05 am

Apprentice wrote:In my example you would have something traba this line.
strategy.parameters: add ("Price");
strategy.parameters: addString ("Type", "Price Type", "", "Bid");
strategy.parameters: addStringAlternative ("Type", "Bid", "", "Bid");
strategy.parameters: addStringAlternative ("Type", "Ask", "", "Ask");

Each code is unique.
You can not compare the variables of the same name in different code examples.


I know this. I have no idea why you keep making these misunderstandings. Have you looked at the code for Breakout Strategy? That's the code I'm talking about, no other code.

If you look at the code (Breakout_Strategy.lua) you will see:
Code: Select all
...
    strategy.parameters:addString("Type", "The time type", "", "TD");
    strategy.parameters:addStringAlternative("Type", "Local Time", "", "LT");
    strategy.parameters:addStringAlternative("Type", "EST Time", "", "EST");
    strategy.parameters:addStringAlternative("Type", "GMT Time", "", "GMT");
    strategy.parameters:addStringAlternative("Type", "Trading Day time", "", "TD");
...

gSource = ExtSubscribe(2, nil, instance.parameters.TF, instance.parameters.Type == "Bid", "bar");
...


I don't understand how I can be more clear about my point.
Hug Coder
 
Posts: 38
Joined: Fri Jan 13, 2012 5:43 am

Re: Breakout Strategy

Postby Apprentice » Wed Feb 01, 2012 8:15 am

You're right, i hav not looked at the original version.
My post was theoretical.
In this version have fix this bug.
I also fix all subsequent versions.
Had no doubt about the accuracy of the original.
Experienced developers have overlooked this bug.
Breakout_Strategy.lua
(13.24 KiB) Downloaded 1756 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Breakout Strategy

Postby Apprentice » Wed Feb 01, 2012 9:01 am

Breakout Strategy with GMMACD Filter added to topmost post.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Breakout Strategy

Postby mfoste1 » Wed Feb 01, 2012 9:35 am

Apprentice wrote:Breakout Strategy with GMMACD Filter added to topmost post.



WHY WILL NO ONE ATTEND MY SIMPLE REQUEST?!?!

THIS IS UNBELIEVABLE :shock:

this website needs proper management, because it is very poorly controlled. Most requests get skipped over or just ignored(as in my case with two requests that i have made in the past two months). These would have taken ten to 15 minutes to finish altering the code and yet they are skipped over? why? do i need to pay someone to do this?
mfoste1
 
Posts: 66
Joined: Thu Oct 21, 2010 6:55 pm

Re: Breakout Strategy

Postby ronald3rg » Wed Feb 01, 2012 9:56 am

foste,

you really need to take into consideration that the coders are doing this for free. This is not a right it is a privilege for us the users. The way you seem to get upset and your post seem out of line I would not create your request either.

I'm just saying. You should apologize and try to ask again.
Right place at the right time

3Rg
ronald3rg
 
Posts: 39
Joined: Tue Oct 18, 2011 6:12 pm
Location: New York

Re: Breakout Strategy

Postby waelsaleem » Wed Feb 01, 2012 2:12 pm

Thank you so much for the strategy. I will let you know how it works.
waelsaleem
 
Posts: 14
Joined: Mon Jan 16, 2012 10:57 am

Re: Breakout Strategy

Postby mfoste1 » Wed Feb 01, 2012 7:35 pm

ronald3rg wrote:foste,

you really need to take into consideration that the coders are doing this for free. This is not a right it is a privilege for us the users. The way you seem to get upset and your post seem out of line I would not create your request either.

I'm just saying. You should apologize and try to ask again.


I've had requests up for MONTHS that have been repeatedly ignored. This would certainly generate a degree of frustration, which might be misconstrued by you as "out of line". I would ask again, but my request would most likely be ignored as the previous have been. I never said it was a "right" of mine to get my strategy requests serviced. Moreover, it was stated by the coders that strategy requests would be worked on in the order they were received in the "development cue". They have failed to heed to their own M.O. It's as simple as that. If they want to operate on requests at will or whichever they please, then they need to stop telling people that requests will be "added to the development cue". They should just say "We will work on whatever we want, whenever its convenient for us." This way there would be no discussion that we're having right now. Very simple....
mfoste1
 
Posts: 66
Joined: Thu Oct 21, 2010 6:55 pm

Re: Breakout Strategy

Postby BabyCoder » Fri Feb 10, 2012 7:39 pm

Hi,

I am quite interested in the breakout strategy with the GMMACD filter. I have discovered that this was created on the 1st page of this thread. Is it possible to code this filter to the updated version of the breakout strategy?

Keep up the good work ;)
BabyCoder
 
Posts: 25
Joined: Fri Dec 23, 2011 6:43 am

Re: Breakout Strategy

Postby Hug Coder » Sat Feb 11, 2012 10:21 am

mfoste1:
I took some time to fill in your request. I think it is what you meant, please confirm that it works as intended before any live trading is done.

I added a maximum trade limit, if you have OncePerDay == false, i.e. you allow Multiple trades. You can specify maximum trades in the parameters. 0 == unlimited trades.

I also updated the tradesCount function so it actually counts number of S or B trades, not returns 0 or 1.

BabyCoder:
The strategy posted on first page is the latest. Unless you want my version which is just modified with allowing multiple trades and maximum trades.

Previous code had "bugs" by the way. Why would you write:

For buy:
...
and tradesCount('B') == 0
...
For sell:
...
and tradesCount('S') == 0
...

When you already cover that with:
and (Multiple or (not todayBuy))
...
and (Multiple or (not todaySell))

If Multiple == false it won't open another trade anyway.
Together with
function enter(BuySell)
...
if tradesCount(BuySell) > 0 then
return true;
end
...

You double and triple check things.

This means it will only take a position if there isn't one already == never multiple trades. But I guess that was what you intended though. But if you had a breakout one day and next too and the first didn't reach it's limit yet, it wouldn't act on the second breakout.

Edit:
Important notice:If you set "Once Per Day" to True, you have to set "Max open positions (0 == unlimited)" to 1 if you don't want more than 1 position open in the same direction! This was limited to 1 position in previous versions, so be aware of this difference!
Attachments
Breakout_Strategy with GMMACD Filter.lua
Updated Breakout Strategy with GMMACD and multi/max trades.
(14.64 KiB) Downloaded 1430 times
Last edited by Hug Coder on Tue Feb 14, 2012 6:04 am, edited 1 time in total.
Hug Coder
 
Posts: 38
Joined: Fri Jan 13, 2012 5:43 am

Re: Breakout Strategy

Postby waelsaleem » Sun Feb 12, 2012 4:59 pm

Hello team,

Thank you for coding the GMMACD filter I suggested. It certainly helped eliminate some false breakouts. But I still struggled with finding the optimal level to set the trade trigger and the take profit level, despite of extensive backtesting. The problem is that the box hight is different each day depending on the market condition. I then remembered that the common factor that does not change is the Fibonacci levels. So I started plotting them in the box range, and the results are eye opening. Take a look at the attached graph. Plotting the stop loss levels, and take profit levels based on Fib levels appears more universal, and by looking at several charts, it appears more bullet proof than using fixed pip numbers. It also apprears more consistent from day to day.

So, I am kindly requesting an new improved strategy: Breakout-GMMACD strategy with Fibo-tracing:
*** The strategy would measure the box hight, and determine all the possible Fibo levels.
*** In the field for (excess over high limit to open position), it would become a drop-down menue of different fib level (instead of pips) that the user would choose.
*** in the field for take profit, and stop loss, it also changes to fib levels instead of pips.
*** The user would still have the option for trailing the stop level, and the option of not placing a take profit level.

All the above options can be potentially optimized by backtesting for each pair. I am optimistic that this strategy will deliver.

Please let me know what you think.
Thanks again for a great job.
Attachments
Fibo-Breakout-12.JPG
waelsaleem
 
Posts: 14
Joined: Mon Jan 16, 2012 10:57 am

PreviousNext

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 4 guests