Breakeven Strategy

Strategies are published here.

Moderator: admin

Re: Breakeven Strategy

Postby Apprentice » Fri Feb 07, 2014 3:08 am

It should work on all open positions.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 21790
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Breakeven Strategy

Postby PipGrabber » Fri Feb 07, 2014 3:15 am

Apprentice wrote:It should work on all open positions.


does it? Silverthorn did say if opened by other strategies.

maybe manually, yes.

that brings back to my request. that this strategy automatically detect opened positions.. till now i'm still waiting..

and i think Silvethorn has the same sentiments with me..

unless your doing manually run this strategy everytime..
User avatar
PipGrabber
 
Posts: 46
Joined: Fri Jan 21, 2011 9:22 am

Re: Breakeven Strategy

Postby chimpy » Fri Feb 07, 2014 5:44 am

PipGrabber wrote:
Apprentice wrote:It should work on all open positions.


that brings back to my request. that this strategy automatically detect opened positions.. till now i'm still waiting..


unless your doing manually run this strategy everytime..


A quicker route to making the break even strategy detect open positions is if its linked to or part of some other stretegy or signal. If it could be made to work with the Strategy Builder, then when this strategy is eventually fixed there wont be endless requests to make it work with this, that or the other strategy.
The Highly adaptable RSI and Advanced Fractal strategies are well thought out and have many options, if all these other goodies were developed to a standard template then I think it would benefit everyone and save a lot of requests and development time.

I'd personally like to see the break even strategy working with the Advanced Fractal. If it works with anything reasonable then it would be great.
chimpy
FXCodeBase: Initiate
 
Posts: 112
Joined: Fri Jun 10, 2011 10:32 am

Re: Breakeven Strategy

Postby Silverthorn » Fri Feb 07, 2014 7:29 pm

It needs to be able to be set so that when applied to a pair it monitors ALL open positions reguardless of how they were opened. :roll:
User avatar
Silverthorn
 
Posts: 57
Joined: Fri Nov 08, 2013 12:29 am
Location: Brisbane Australia

Re: Breakeven Strategy

Postby chimpy » Sat Feb 08, 2014 5:44 am

Silverthorn wrote:It needs to be able to be set so that when applied to a pair it monitors ALL open positions reguardless of how they were opened. :roll:


an option like that is desirable for some but you may not want it to close some positions for that symbol. e.g. long term positions with an intentionaly big stop or positions generated by a different strategy.
both is best.
chimpy
FXCodeBase: Initiate
 
Posts: 112
Joined: Fri Jun 10, 2011 10:32 am

Re: Breakeven Strategy

Postby moomoofx » Fri Feb 14, 2014 6:36 am

Hi all,

I have re-written this strategy to support all open trades so you do not have to specify the trade in advance and it only works per account and per symbol so if you don't want your trade to be impacted by this strategy, put it on another account. I also tried to implement trailing stop losses as someone requested that.

HOWEVER - there are some conditions for FIFO users that I'll explain.

Firstly, FIFO accounts are very difficult to work with. It appears there is no way to link an existing Entry Stop order with the trade it is supposed to stop, for FIFO accounts. Therefore, if you have a FIFO account, the system has no idea which stop order is for which trade - and it doesn't matter since it is FIFO anyway.

The problem is that when this strategy runs, it also cannot tell if an existing trade has an associated Entry Stop order and therefore cannot know if it should update a possibly existing order, or create a new one.

The problem becomes worse if you are FIFO and Hedging is enabled, because if a stop order was attached to the original trade, and this strategy created another one, you'll end up with an open position in the opposite direction. Even worse still, this strategy would normally then go create a stop order for that trade, but I've coded it to detect it's own trade and not do that at least.

Therefore, I'm sorry FIFO users, the strategy does not, and cannot, support trades with existing stop orders very well. It will presume all trades do not have stop orders already created.

For regular Non-FIFO users, it updates existing stop orders as required.

I don't have a FIFO account so I haven't tested except in the debugger. On my Non-FIFO demo it worked fine. Let me know how it looks guys.

Cheers,
MooMooFX
Attachments
BreakevenAll.lua
(13.47 KiB) Downloaded 814 times
User avatar
moomoofx
FXCodeBase: Confirmed User
 
Posts: 193
Joined: Wed Oct 23, 2013 10:26 pm
Location: Okinawa, Japan. http://moomooforex.com

Re: Breakeven Strategy

Postby Vantages » Wed Jun 18, 2014 9:24 pm

Hello moomooFx, :D

Fortunately, all your works and revisions for a lot of strategies are the
ones I ever planned to develop, not by me, but with someone else more
capable but it always came out with a lot of challenges. I just registered
in this site to give compliments to all your accomplishments in this venue.
Thank you very much! You're amazing!

I tried all versions and updates of HIGHLY ADAPTABLE RSI and it works
perfectly fine in line with my approach. What I only notice is it's not working
with longer periods beyond 100 and "valid interval for operation in second"
is a bit tricky-not really sure if it's working- can we replace this with number of
touches or crosses instead to minimise the multiples?

To complete my overall portfolio setup I included your version of BREAKEVENALL,
but unfortunately not performing the way it should be- ERROR ON STOP.
I tried to set it to (10,10) , (10,1) , (10,0) with only one currency pair.

My setup will continuously place new positions-unlimited base on
HIGHLY ADAPTABLE RSI without stops and limits and trailings and filters,
purely base on level crosses, but the BREAKEVENALL is supposed to reduce
the said positions should the price bounces back. Last night, the setup
entered more than 100's of new positions, but the BREAKEVENALL is giving
me headaches-should have closed more than half of those new positions... :(

Please help me on this issue. The BREAKEVENALL will complete my setup.

Thanks a lot!

Vantages
Vantages
 
Posts: 15
Joined: Wed Jun 18, 2014 9:00 pm

Re: Breakeven Strategy

Postby moomoofx » Sun Jun 22, 2014 1:16 pm

Hi Vantages,

Apologies for the late reply, I am travelling at the moment.

Thank you for the nice comments. I'm glad to hear you are generally happy with my work. Sorry to hear you are having some problems.

Regarding the HA RSI strategy, this is the wrong forum topic to discuss this strategy. However, in short:
- Periods up to 10000 should be fine. If you have any specific examples of it not working, please post the details on the HA RSI strategy's topic.
- An enhancement instead of "Valid interval for operation in second" is also possible, please post the details on the HA RSI strategy's topic.

Regarding the BreakEvenAll troubles you are having... if you are creating positions without any stops via the HA RSI strategy then I cannot see any reason why it should not work.
- You said it errors on stop? What is the error message you are seeing?
- Can you please let me know which currency pair are you using and if your account type is FIFO or Non-FIFO?
- If you configure the HA RSI strategy to create a stop on those trades, does the HA RSI strategy successfully create stop orders on newly opened positions?

If I can reproduce the problem, then I can fix it. Although, I am travelling so please be patient.

Cheers,
MooMooFX
User avatar
moomoofx
FXCodeBase: Confirmed User
 
Posts: 193
Joined: Wed Oct 23, 2013 10:26 pm
Location: Okinawa, Japan. http://moomooforex.com

Re: Breakeven Strategy

Postby Vantages » Sun Jun 22, 2014 8:16 pm

Hello MooMooFx,

Thank you so much for your response. Highly Appreciated.

The account is non-FIFO.

With regards to BREAKEVENALL, I explored the strategy a bit more with your HA RSI and here are some of my inquiries and suggestions:

-The logics of the strategy is very useful & brilliant, the data inputs necessary :
>LEADGAP:Initial positive gain(pips) that will act as cushion and exit level should the price retraces,
>MINPROFITS: Trails the initial positive gain from or starting from the LEADGAP,
>SETTRAILING: YES or NO to trail the positive gained, otherwise will stay at the LEADGAP level?

-Attachment to any other strategy MUST have a stoplevel to begin with? (I think my error is in here)
-Attachment to any other strategy WITH MAGICNUMBER to avoid interference in any forex,indices,CFD's and commodities in any amount and frequency of trades in any one account/login?

In my case which I will explain further in HA RSI forum is taking hundreds (thousands in the future)
of new positions everyday, would it be possible to add CLOSEALL (symbol specific) with certain
TOTALPROFIT (pips) should there be any exaggerations in price and not just taking the retracements of it? I think with this, PROTECTION and PROFIT are combined...

Thank you for your time. Looking forward for your response. Have a safe & nice day!

Vantages
Vantages
 
Posts: 15
Joined: Wed Jun 18, 2014 9:00 pm

Re: Breakeven Strategy

Postby Vantages » Mon Jun 23, 2014 9:23 pm

Hello MooMooFx,

In addition to my recent post, I just want to share the recent scenario with the BREAKEVENALL strategy yesterday in my live account. HA RSI was set to m1>100period>50levelcross>multiplesell>nofilters>noentries>withcustomid>1000secondinterval
>1000trailingstop>1000limit; BREAKEVENALL was set to m1>10minprofit>10leadgap>trailing.

What happened was that more than 50 positions was entered by HA RSI, 12 of those got more than +30pips profit each, but those 12 positions with more than +30pips profit each was exited at just +10pips profit each. My confusion here is I thought that with my setup when or each +10pips profit the leadgap will also move by +10pips making it +20pips cushion and in my case yesterday should have been +30pips profit cushion in each position when the price retraces to some previous level.

I also noticed that the strategy must be PAUSED-RESTART for 5 to 10 times before it works out.

Hope you could give clarity to my case. Thank you and have a nice day.

Vantages
Vantages
 
Posts: 15
Joined: Wed Jun 18, 2014 9:00 pm

PreviousNext

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 4 guests