Page 10 of 17

Re: Breakout Strategy

PostPosted: Sun Jan 22, 2012 1:54 pm
by mfoste1
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

Re: Breakout Strategy

PostPosted: Wed Jan 25, 2012 2:17 pm
by jrevhard
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

Re: Breakout Strategy

PostPosted: Sat Jan 28, 2012 12:37 pm
by waelsaleem
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.

Re: Breakout Strategy

PostPosted: Sun Jan 29, 2012 1:50 pm
by Apprentice
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.

Re: Breakout Strategy

PostPosted: Sun Jan 29, 2012 4:09 pm
by waelsaleem
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?

Re: Breakout Strategy

PostPosted: Mon Jan 30, 2012 9:16 am
by Apprentice
The request is understandable.
It is possible to write it.
Will it be a successful strategy, it is difficult to say, in advance.

Re: Breakout Strategy

PostPosted: Mon Jan 30, 2012 10:00 am
by Hug Coder
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.

Re: Breakout Strategy

PostPosted: Mon Jan 30, 2012 10:43 am
by Apprentice
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.

Re: Breakout Strategy

PostPosted: Tue Jan 31, 2012 7:16 am
by Hug Coder
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.

Re: Breakout Strategy

PostPosted: Wed Feb 01, 2012 3:04 am
by Apprentice
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.