stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Rinse 'n Repeat
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4693
Page 7 of 56
Author:  r2997790 [ Tue Apr 26, 2016 7:07 am ]
Post subject:  Rinse 'n Repeat

spymez » Tue Apr 26, 2016 7:34 am wrote:From my reading and re-reading am I to assume this EA is time-frame independent? I see some are using M5 and H4 TF. What if any is the difference? Thanks
This EA and strategy trades on price action so the timeframe is irrelevant.
Author:  spymez [ Tue Apr 26, 2016 7:24 am ]
Post subject:  Rinse 'n Repeat

Thanks guys.
Author:  SteveHopwood [ Tue Apr 26, 2016 9:04 am ]
Post subject:  Rinse 'n Repeat

V 1g is in post 1. I have removed the ticket display - that was only ever intended to help me when developing the code. One of the bits of code that went awol last night was the partial emergency stop loss display, so I have replaced that.

:xm:
Author:  szfxtrader [ Tue Apr 26, 2016 9:17 am ]
Post subject:  Rinse 'n Repeat

SteveHopwood » Tue Apr 26, 2016 9:04 am wrote:V 1g is in post 1. I have removed the ticket display - that was only ever intended to help me when developing the code. One of the bits of code that went awol last night was the partial emergency stop loss display, so I have replaced that.

:xm:
Thanks
Author:  SteveHopwood [ Tue Apr 26, 2016 9:18 am ]
Post subject:  Rinse 'n Repeat

I have added an updated version of my position monitoring indi to post 1, for those of us watching on a different machine to the one doing the trading. The update includes a results for today display.

:xm:
Author:  SteveHopwood [ Tue Apr 26, 2016 11:46 am ]
Post subject:  Rinse 'n Repeat

V 1h is in post 1, prompted by this pm:
arts wrote:Morning Steve,

I've got RnR on a demo and it really is fun to watch - great coding as always.

Quick suggestion which I guarantee will make this more profitable - not a lot(!!) - but certainly a little, and particularly with a small 'distance between trades' where you are really churning through orders.

Whenever there is a close routine involving both buys and sells, at the moment you close each trade individually. However there is a little know function - CloseBy() - which allows you to offset opposite trades, saving on spread and commission. It closes both by combining the two trades into one, using one of the open prices as the close price (saving spread) and, as the second trade effectively disappears, removing the commission on that second trade. Et voila - increased equity, no risk!

Come to think of it, I might have mentioned it to you before in regards some other grid traders , but no harm in a reminder.

Regards,

John
Clicker pointedout OrderCloseBy() a couple of week ago, but I could not see how to use it here. I thought about it again after reading John's pm and realised that the big losing trade and the biggest of the winning trades in a complex offset, can be closed at the same time. Run this through crapergy tester and you will see how the second trade is annulled.

I have also added extra code to overcome the platform freezing because the ea is trying to close a trade that no longer exists. This seems to be working and the $500 deposit is currently worth just shy of $15,000,000 in the test I am running to make sure I have overcome the freezing thingy.

This is a blast. Glad I am not teaching today - not something you will often hear me say. :lol:

:xm:
Author:  Clicker [ Tue Apr 26, 2016 12:27 pm ]
Post subject:  Rinse 'n Repeat

Thanks Steve for implementing this! Just one hint for other traders: It is not guaranteed that your broker supports OrderCloseBy. But nearly all should
Author:  Fibotrend [ Tue Apr 26, 2016 2:56 pm ]
Post subject:  Rinse 'n Repeat

Clicker » Tue Apr 26, 2016 12:27 pm wrote:Thanks Steve for implementing this! Just one hint for other traders: It is not guaranteed that your broker supports OrderCloseBy. But nearly all should
Having played with Remon simulator for a couple of weeks, I think this is a good idea in a trending market, however it wouldn't work in a range. You can verify it by using the non-hedge mode in the simulator.

Possible scenario: you have a retracement after three long trades, the EA closes the long trade in the middle (lvl2) with a short order. The baseline now is at level two with no trades, you have a long trade below (lvl1) and above (lvl3). Then the price starts bouncing between lvl1 and lvl3 while the EA keeps sending open/close orders at lvl2. Eventually the exercise will cost you more in spread/commissions.

my 2c
Author:  patmontes [ Tue Apr 26, 2016 3:46 pm ]
Post subject:  Rinse 'n Repeat

Hi Steve, Remon,

Just an idea to add on the logic pdf on the 1st page left side when we have a buy then ask the question if we have a losing sell trade:
Aside from checking only largest winning sell trade that can be used to close, can it also have the option to use a group of sells to close?
"is there a group of sell trades in profit that can be used to close largest losing sell trade?"

And vice versa for right side of the logic pdf
Author:  SteveHopwood [ Tue Apr 26, 2016 4:12 pm ]
Post subject:  Rinse 'n Repeat

V 1i is in post 1 - Bruster again. :clap: :clap: :clap:

He was fairly sure that the wrong trades sometimes closed in the complex offsetting. He had added some extra code and a couple of new arrays for ticket numbers and is happy now that the correct trades are always closing in the correct order.

:xm:
All times are UTC Page 7 of 56