Breakout Strategy

Strategies are published here.

Moderator: admin

Re: Breakout Strategy

Postby mfoste1 » Sun Jan 22, 2012 1:54 pm

i really find it amazing how my requests are added to the "development que" months ago for this strategy and yet they never get attended to, yet there have been many requests for other new strategies since then that have been finished. Can someone please work on my request that i proposed weeks ago?

its very simple that will take no more than 15 minutes of work to the most recent code for this algo

1. allow N number of positions

so that a trader can hold and build a position over the development of a trend instead of having to just hold one position and not being allowed to add to it in the same direction
mfoste1
 
Posts: 66
Joined: Thu Oct 21, 2010 6:55 pm

Re: Breakout Strategy

Postby jrevhard » Wed Jan 25, 2012 2:17 pm

hi, i cant seem to get this strategy to trade for me? i see it in the log as being started but not putting on any trades. ive attached a pic of the parameters. maybe i need to modify my parameters. any help would be appreciated.

thanks

jr
Attachments
breakout stategy.PNG
Thanks

Jr
jrevhard
 
Posts: 4
Joined: Wed Jan 18, 2012 5:50 pm
Location: dallas tx

Re: Breakout Strategy

Postby waelsaleem » Sat Jan 28, 2012 12:37 pm

Hello,

I have a request to make this strategy even better: Breakout-GMMACD Strategy:
This would be identical to the breakout strategy. The only difference is that the trade is triggered only if it is confirmed by the GMMACD indicator histogram. if the histogram (GMMACD value) is in the same direction of the trade, then the trade is triggered. Exit strategies are identical to the original strategy.

Note the diagram attached. The improved strategy would prevent the 2 potentially losing triggers that would have been otherwise triggered by the standard strategy.

This will likely prevent many losing trades triggered against the overal trend. Let me know what you think.

Great job as always.
Attachments
Breakout-GMMACD strategy.JPG
waelsaleem
 
Posts: 14
Joined: Mon Jan 16, 2012 10:57 am

Re: Breakout Strategy

Postby Apprentice » Sun Jan 29, 2012 1:50 pm

Your request is added to the developmental cue.
A small request.
Do not put a your requirements in more places within the forum.
One is enough.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Breakout Strategy

Postby waelsaleem » Sun Jan 29, 2012 4:09 pm

Thank you, and sorry, I was not sure of which forum would be most relevant to my request. I hope you liked the illustration, did it explain my request? do you think it will work?
waelsaleem
 
Posts: 14
Joined: Mon Jan 16, 2012 10:57 am

Re: Breakout Strategy

Postby Apprentice » Mon Jan 30, 2012 9:16 am

The request is understandable.
It is possible to write it.
Will it be a successful strategy, it is difficult to say, in advance.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Breakout Strategy

Postby Hug Coder » Mon Jan 30, 2012 10:00 am

This strategy has a flaw in the programming.
When you call "ExtSubscribe" you use instance.parameters.Type == "Bid" to determine if it should be a Bid or Ask price. But you use instance.parameters.Type for "The time type". So it will never be == "Bid" (true), which means that you will always use Ask prices (false).

Is this really intentional?
If you want just Ask price I think you should be clear and just change it to false instead of that equivalence test. People who want to learn programming will get confused by such things.
Hug Coder
 
Posts: 38
Joined: Fri Jan 13, 2012 5:43 am

Re: Breakout Strategy

Postby Apprentice » Mon Jan 30, 2012 10:43 am

That's not true.
ExtSubscribe forward the information via Boolean variables.

If we have
instance.parameters.Type == "Bid"
And instance.parameters.Type is equivalent to "Bid"
We have true Boolean transmitted.
Use Bid Price Stream.
In any other case you have false.
Use Ask Price Stream.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Breakout Strategy

Postby Hug Coder » Tue Jan 31, 2012 7:16 am

Apprentice wrote:That's not true.
ExtSubscribe forward the information via Boolean variables.

If we have
instance.parameters.Type == "Bid"
And instance.parameters.Type is equivalent to "Bid"
We have true Boolean transmitted.
Use Bid Price Stream.
In any other case you have false.
Use Ask Price Stream.


I know that, but look at the parameter instance.parameters.Type!
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");

Where do you see Bid or Ask?
It will never be == "Bid" => Always false ==> Always Ask price.
Hug Coder
 
Posts: 38
Joined: Fri Jan 13, 2012 5:43 am

Re: Breakout Strategy

Postby Apprentice » Wed Feb 01, 2012 3:04 am

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.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

PreviousNext

Return to Custom Strategies

Who is online

Users browsing this forum: Baidu [Spider] and 15 guests