• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 12:39pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 12:39pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Daily Highs and Lows to Previous Daily Highs and Lows 1 reply

Higher Highs/ Lows and Lower Highs/ Lows 14 replies

buying and selling the news, eurusd 29/4/08 1 reply

Difference between selling a Call and buying a Put? 5 replies

Buying Dips and Selling Rallies 16 replies

  • Trading Systems
  • /
  • Reply to Thread
  • Subscribe
  • 38
Attachments: The Ghillyoar System (buying highs and selling lows)
Exit Attachments

The Ghillyoar System (buying highs and selling lows)

  • Last Post
  •  
  • 1 34Page 567 10
  • 1 4Page 56 10
  •  
  • Post #81
  • Quote
  • Apr 19, 2021 3:33pm Apr 19, 2021 3:33pm
  •  neosqualls
  • | Joined Feb 2011 | Status: Member | 137 Posts
Hi Fxtrue,

Again i mention averaging / Martingaling and that's the only part of what i said that have been kept, anyway i asked Paddy if it was a hedging system.

From my experience, and some others ... in real market condition, hedging strategies can give very different results from backtest.

Thanks for your work, you code better than i do
 
 
  • Post #82
  • Quote
  • Apr 19, 2021 6:57pm Apr 19, 2021 6:57pm
  •  gerval
  • | Joined May 2020 | Status: Member | 106 Posts
Quoting fxtrue
Disliked
Just to clarify for those who can't understand the strategy ... 1) it trades with fixed lots 2) it's trying to pyramid i.e. add to a winning position, it's not averaging / Martingaling (adding to a losing position) 3) exit rule #2 is to get out of a stalemate situation where price has triggered trades in one direction and then reversed - this is especially relevant during flat market conditions where a growing number of buys and sells could accumulate without achieving the target profit 4) more exit rules are required to improve the strategy's ability...
Ignored
Based on the pyramid that "FXTRUE" comments and as he says, the biggest problem I see is that the price enters the range, so we would accumulate many operations that freeze each other.

Or that the price goes in one direction and turns around which would leave us with some operations in favor and more against and further away, so the price should move too much in the direction of the turn.

In my opinion, we should never allow positive trades to go negative and drag them, so when opening an order, a breakeven (+ minimum pip) could be placed in the previous one and successively, so we would never carry many trades behind against, waiting that the price takes a direction and adds in the pyramid. We would always have an operation at the peak of the turn, but with a little movement we would be compensated for the new orders in favor of the turn, it is like following the price until it decides to move in one direction.

To exit automatically, a trailing could be used with the balance of all open operations that would recalculate a profit, looking for a configurable profit.
We are trying to pyramid, therefore we must wait for the trend with logical benefits and come out as best as possible in the ranges, waiting for the movement that takes us in favor of the pyramid.

"Paddy9" don't leave us at this point
 
 
  • Post #83
  • Quote
  • Apr 20, 2021 3:22am Apr 20, 2021 3:22am
  •  tesiag
  • | Joined Apr 2021 | Status: Member | 68 Posts
Quoting fxtrue
Disliked
As promised, I attach Paddy9's (moderately) cleaned-up code for the Ghilly Oar system that generated the provided test results. Paddy9 explained that the purpose of this thread was to encourage some "thinkers" (rather than "takers") get involved and try adding additional exit rules that might benefit the system and be adopted if useful. You will therefore find example code at lines 600-602 than can be copied and used to add additional rules. I hope that useful rules will be shared ...just as I hope that the source code of other EAs for this strategy...
Ignored

thanks fxtrue.....analysis of your code shows that Buy_Bench and Sell_Bench is updated at every bar; I understood they were to be updated once the system exit from all positions in gain (rule#1)..while they re kept constant when the system exits all positions in loss (rule#2).
 
 
  • Post #84
  • Quote
  • Apr 20, 2021 4:11am Apr 20, 2021 4:11am
  •  yonnie
  • Joined May 2008 | Status: Member | 1,156 Posts
Quoting gerval
Disliked
{quote} Based on the pyramid that "FXTRUE" comments and as he says, the biggest problem I see is that the price enters the range, so we would accumulate many operations that freeze each other. Or that the price goes in one direction and turns around which would leave us with some operations in favor and more against and further away, so the price should move too much in the direction of the turn. In my opinion, we should never allow positive trades to go negative and drag them, so when opening an order, a breakeven (+ minimum pip) could be placed...
Ignored
hey gerval....genasea and I have a discussion about these very topics in "Grid trading system, keeping DD to a minimum"....hope you get something out of it
 
 
  • Post #85
  • Quote
  • Apr 20, 2021 4:12am Apr 20, 2021 4:12am
  •  Beren
  • | Joined Jan 2019 | Status: Member | 67 Posts
Looking at a different timeframes, 4H or 1H it could be very interesting too, without limiting 1 trade per day,
 
 
  • Post #86
  • Quote
  • Apr 20, 2021 5:42am Apr 20, 2021 5:42am
  •  fxtrue
  • Joined May 2019 | Status: Member | 46 Posts
Quoting tesiag
Disliked
{quote} thanks fxtrue.....analysis of your code shows that Buy_Bench and Sell_Bench is updated at every bar; I understood they were to be updated once the system exit from all positions in gain (rule#1)..while they re kept constant when the system exits all positions in loss (rule#2).
Ignored
This is actually Paddy9's code - I simply cleaned it up so it would be more useful / less confusing for the group.

As for the buy / sell bench checks you mention, the operation is correct ...it's just not optimal - since the closing price two candles back only changes when a new bar opens, that code could be updated to evaluate only at the start of a new bar.
 
 
  • Post #87
  • Quote
  • Apr 20, 2021 5:54am Apr 20, 2021 5:54am
  •  fxtrue
  • Joined May 2019 | Status: Member | 46 Posts
Quoting gerval
Disliked
{quote} Based on the pyramid that "FXTRUE" comments and as he says, the biggest problem I see is that the price enters the range, so we would accumulate many operations that freeze each other. Or that the price goes in one direction and turns around which would leave us with some operations in favor and more against and further away, so the price should move too much in the direction of the turn.
Ignored
This is not quite correct as it's not really possible to accumulate "many positions"... remember that the system is trading 0.1 lots and shooting for a $50 target - that's only a 50-pip move for a single entry and the target has been achieved.

Also, since rule #2 closes the batch if "buys = sells" and "buy profit or sell profit > 20" then it's unlikely that there would ever be more than 2 buys locked by 2 sells.
 
1
  • Post #88
  • Quote
  • Apr 20, 2021 9:51am Apr 20, 2021 9:51am
  •  fxtrue
  • Joined May 2019 | Status: Member | 46 Posts
Quoting neosqualls
Disliked
Hi Fxtrue, Again i mention averaging / Martingaling and that's the only part of what i said that have been kept, anyway i asked Paddy if it was a hedging system. From my experience, and some others ... in real market condition, hedging strategies can give very different results from backtest. Thanks for your work, you code better than i do
Ignored
Hi, Neosqualls ...as I assume Paddy9 explained, it's not averaging or Martingaling because buys are only added as price goes up, and sells are only added as price goes down (i.e. pyramiding). It's also not really a hedging system because as soon as buys = sells and the buy or sell trades have a profit of $20 then everything is closed out with a net loss.

I do agree that there would be differences between live trading and what the strategy tester presents (mostly due to the fixed spread of the tester), but I think the differences would be minimal because there are seldom more than 4 trades in a basket, it's not a particularly spread-sensitive strategy, and the main target (rule 1) / bail-out target (rule 2) are quite minimal considering the default 0.1 lot trade size.

The real issue is, as Paddy9 stated early on, getting the exit right, as entries are really just a secondary consideration when you start to dig into things - I remember reading about a famous trader who entered a position each day based on the flip of a coin... and proved that exits defined profitability
 
 
  • Post #89
  • Quote
  • Apr 20, 2021 10:35am Apr 20, 2021 10:35am
  •  neosqualls
  • | Joined Feb 2011 | Status: Member | 137 Posts
Quoting fxtrue
Disliked
{quote} Hi, Neosqualls ...as I assume Paddy9 explained, it's not averaging or Martingaling because buys are only added as price goes up, and sells are only added as price goes down (i.e. pyramiding). It's also not really a hedging system because as soon as buys = sells and the buy or sell trades have a profit of $20 then everything is closed out with a net loss. I do agree that there would be differences between live trading and what the strategy tester presents (mostly due to the fixed spread of the tester), but I think the differences would be...
Ignored
I agree at 1000% that money management is the biggest part of trading and entry is just a small part of the entire trade. I has the bad idea to say that just like martingale, hedging can also be dangerous (because according to my definition of hedging when you own 2 positions or plus of the same instrument in two different direction it's hedging). I'am definitely not saying this system is a martingale system.

Also when you trade you must consider the psychological effect of your current positions. Even if the EA might be able to recover the loss what is the impact of having like -800$ when your initial target is 50$ ? If you trade live, you know you also have to pay interest on open positions and for example if i go to regular account with IG market and want to activate the hedging you say good bye to stop loss gurantee.

I am just asking things, and to be honest i have seen so many people coming here with "Ghillyoar" (anagram of holy grail) .... A lot of very very smart people have been looking for high profit 100% win rate system and as far as i know nobody get it.

Also, maybe paddy has "writing style" which is a little bit complexe to me, i like when things are straight and simple ...

Anyway, i looked at the code you posted and using the normal distribution as target or filtering instead of the EMA might help
 
1
  • Post #90
  • Quote
  • Edited at 11:27am Apr 20, 2021 10:46am | Edited at 11:27am
  •  tesiag
  • | Joined Apr 2021 | Status: Member | 68 Posts
is it correct (from a backtesting point of view) to allow an entry soon after (i.e. within the same bar) the exit, or viceversa an exit soon after (i.e. wihin the same bar) the entry?

your EA shows this can be possible.

my system which (should) implement your exact rules (apart from not allowing entry and exit in the same bar) sometimes shows different results, which is quite strange for simulations on the long run (months).
 
 
  • Post #91
  • Quote
  • Apr 20, 2021 12:25pm Apr 20, 2021 12:25pm
  •  fxtrue
  • Joined May 2019 | Status: Member | 46 Posts
Quoting tesiag
Disliked
is it correct (from a backtesting point of view) to allow an entry soon after (i.e. within the same bar) the exit, or viceversa an exit soon after (i.e. wihin the same bar) the entry? your EA shows this can be possible. my system which (should) implement your exact rules (apart from not allowing entry and exit in the same bar) sometimes shows different results, which is quite strange for simulations on the long run (months).
Ignored
I'm not sure that it matters (Paddy9 can always comment if so), and instant re-entry (if conditions are met) may improve profitability if the market is moving in the trend direction.
 
 
  • Post #92
  • Quote
  • Apr 20, 2021 1:09pm Apr 20, 2021 1:09pm
  •  Go5
  • | Joined Jun 2014 | Status: Invisible | 1,487 Posts
Looks like rule #2 has to go - new targets grow out of sight...
Also a "Re-Bench" after a candle close under the EMA seems useful.

Attached Image (click to enlarge)
Click to Enlarge

Name: EG_GHILL.png
Size: 86 KB
 
1
  • Post #93
  • Quote
  • Apr 20, 2021 5:03pm Apr 20, 2021 5:03pm
  •  gerval
  • | Joined May 2020 | Status: Member | 106 Posts
Quoting fxtrue
Disliked
{quote} This is not quite correct as it's not really possible to accumulate "many positions"... remember that the system is trading 0.1 lots and shooting for a $50 target - that's only a 50-pip move for a single entry and the target has been achieved. Also, since rule #2 closes the batch if "buys = sells" and "buy profit or sell profit > 20" then it's unlikely that there would ever be more than 2 buys locked by 2 sells.
Ignored
ok, maybe what I mentioned was not exactly the strategy, but more generally the pyramid.

I will reread the strategy to adjust to it.
 
 
  • Post #94
  • Quote
  • Apr 21, 2021 4:59am Apr 21, 2021 4:59am
  •  tesiag
  • | Joined Apr 2021 | Status: Member | 68 Posts
Quoting gerval
Disliked
{quote} ok, maybe what I mentioned was not exactly the strategy, but more generally the pyramid. I will reread the strategy to adjust to it.
Ignored
Hi Gerval the system is a typical antigrid (google it to know how it works). In trending markets it works ok...in lateral it freezes. Rule#2 is designed to exit when the system freezes..and paddy is asking us to contribute with other ideas on how to exit from such situations
 
1
  • Post #95
  • Quote
  • Apr 22, 2021 4:18am Apr 22, 2021 4:18am
  •  fxtrue
  • Joined May 2019 | Status: Member | 46 Posts
Quoting neosqualls
Disliked
{quote}i looked at the code you posted and using the normal distribution as target or filtering instead of the EMA might help
Ignored
@neosqualls That's an interesting thought - how would you suggest the normal distribution be calculated (for a coder, my maths ability is oddly minimal )

Is anyone else using normal distribution? If so, please share your thoughts & experiences.
 
 
  • Post #96
  • Quote
  • Edited at 2:39pm Apr 22, 2021 12:09pm | Edited at 2:39pm
  •  neosqualls
  • | Joined Feb 2011 | Status: Member | 137 Posts
Quoting fxtrue
Disliked
{quote} @neosqualls That's an interesting thought - how would you suggest the normal distribution be calculated (for a coder, my maths ability is oddly minimal ) Is anyone else using normal distribution? If so, please share your thoughts & experiences.
Ignored

Here is a piece of code i used. There was a very interesting thread by Ceeso, he no longer come on forexfactory.

So for example : you calculate that over the last X days, 80% of price was between +0.5% and -0.5%. Using this, you might have a take profit for the initial trade with better probability. I don't know yet how to calculate the second take profit exit
The use of normal distribution is mostly interesting to set stop loss and take profit.

Inserted Code
int period = PERIOD_D1;
double x = 0;
double normDist = 0;
 
for (int i = 1; i <= Population; i++) {
     x += (MathAbs(iHigh(Symbol(),period, i) - iLow(Symbol(),period, i)) / ((iHigh(Symbol(),period, i) + iLow(Symbol(),period, i)) / 2)) * 100;
}
x *= (1 / Population);
for (int j = 1; j <= Population; j++) {
     normDist += MathPow(((MathAbs(iHigh(Symbol(),period, j) - iClose(Symbol(),period, j)) / ((iHigh(Symbol(),period, j) + iLow(Symbol(),period, j)) / 2)) * 100) - x, 2);
}
normDist= MathSqrt((1 / Population) * normDist);
 
1
  • Post #97
  • Quote
  • Apr 22, 2021 1:53pm Apr 22, 2021 1:53pm
  •  neosqualls
  • | Joined Feb 2011 | Status: Member | 137 Posts
Also, what do you think about reverse the bench if we have for example 2 buys, 2 sells, we buy at the sell bench and sell at the buy bench ?
 
 
  • Post #98
  • Quote
  • Edited at 3:48pm Apr 22, 2021 2:24pm | Edited at 3:48pm
  •  danjuma
  • | Joined Feb 2010 | Status: Member | 560 Posts
Hi Paddy9 (if you still bother to read this thread), thanks for sharing your strategy. A quick back test shows it's got legs. Just a case of finding the optimal settings in terms of target step, exit profit and possibly the pips added/subtracted from the close of candle 2 to determine the buy/sell bench. Although you did mention some where that the 30pips you use appears to be the best from your back test. Read your other satirical thread. Quite entertaining! You are definitely nuts with a wicked sense of humour Poor Lucas!
A possible idea of exit strategy could be if there is way to lock-in profits en route to the 'TargetStep'?
 
1
  • Post #99
  • Quote
  • Apr 22, 2021 6:52pm Apr 22, 2021 6:52pm
  •  fxtrue
  • Joined May 2019 | Status: Member | 46 Posts
Quoting neosqualls
Disliked
Also, what do you think about reverse the bench if we have for example 2 buys, 2 sells, we buy at the sell bench and sell at the buy bench ?
Ignored
First up, thanks for that normal distribution example - will be interesting to see how that can be applied.

As for the reversal idea, my first thought is that it turns the strategy into a martingale system as we'd be adding to a locked loss at that point.

Sure, there's a 50/50 chance that price would rise, but it would need to move a long way in my view to have any meaningful impact on the original locked loss, and the bigger question would be what happens if price continues to fall now rule #2 no longer applies and there's no mechanism to add additional sells?

I guess the best thing to do is try it and see what kind of results you get.
 
 
  • Post #100
  • Quote
  • Apr 23, 2021 3:02am Apr 23, 2021 3:02am
  •  neosqualls
  • | Joined Feb 2011 | Status: Member | 137 Posts
Quoting fxtrue
Disliked
{quote} First up, thanks for that normal distribution example - will be interesting to see how that can be applied. As for the reversal idea, my first thought is that it turns the strategy into a martingale system as we'd be adding to a locked loss at that point. Sure, there's a 50/50 chance that price would rise, but it would need to move a long way in my view to have any meaningful impact on the original locked loss, and the bigger question would be what happens if price continues to fall now rule #2 no longer applies and there's no mechanism...
Ignored
What about a time limit based on average time for a winning trade ?

For example cut loss after X days if nothing happen ?
 
 
  • Trading Systems
  • /
  • The Ghillyoar System (buying highs and selling lows)
  • Reply to Thread
    • 1 34Page 567 10
    • 1 4Page 56 10
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022