Peaky

The place for Peaky and Peaky-related stuff.
Post Reply
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Peaky

Post by SteveHopwood »

V 1a is in post 1. This update is inspired by a contribution by jonny007 in the DFC thread and the 'leaky toilet' EU last week. Details in a much updated post 1.

I have abandoned my Diad-style experiment. It appears to me to do nothing better than to leave a lot of pips on the table. I never made it work in Peaky, and so have stripped it from the code.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
jonny007
Trader
Posts: 13
Joined: Thu Jun 06, 2013 2:20 pm
Location: UK

Peaky

Post by jonny007 »

Nice one Steve. Looking forward to taking this new one for a spin. :good:
User avatar
Wavegarrick
Trader
Posts: 1172
Joined: Sun Dec 30, 2012 11:21 am
Location: South Africa

Peaky

Post by Wavegarrick »

Hi Guys,

Just to let you know that I am fully immersed in the testing of Peaky. Early results after a weeks testing look promising. I am trying different variants as you can see from the attached picture. Peaky on the 1 minute timeframe more or less represents Daily pivot extremes. I do not throw it on just any chart but use the DFC Ea dashboard that represents peaky on the hourly timeframe. Proving to be a good combination so far.

I will not post my sets until I have done some more testing myself.
Early days.
Lets see how she goes.

Anyway month end upon us and care should be taken with volatile moves.

Have a great week
Cheers
Leon.
You do not have the required permissions to view the files attached to this post.
trader689
Trader
Posts: 674
Joined: Thu Nov 17, 2011 12:53 am

Peaky

Post by trader689 »

excellent news wave, do keep us posted
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Peaky

Post by SteveHopwood »

V 1b is in post 1 with the same fix I just posted in the HGBndnSSnFB thread.

DIYers, the fix is a little different this time, so make sure you copy this over the top of void FillGapsWithStopOrders():

Code: Select all

void FillGapsWithStopOrders()
{

   //Fill in the gaps between the market price and the most recent trade
   //when the market is above the PH or below the PL.
   
   bool result = true;
   double price = 0;
   double SendLots = Lot;
   double stop = 0, take = 0;
   
   //Sell stops
   if (LatestTradeTicketNo > -1)   
      if (BetterOrderSelect(LatestTradeTicketNo, SELECT_BY_TICKET, MODE_TRADES))
         if (OrderType() == OP_SELL || OrderType() == OP_SELLSTOP)
            if (Bid - OrderOpenPrice() >= (MarketDistance / factor) )
            {
               price = NormalizeDouble(OrderOpenPrice() + (MarketDistance / factor) / 2, Digits);
               if (!DoesStopOrderExist(OP_SELLSTOP, price))
               {
                  stop = CalculateStopLoss(OP_SELL, price);
                  take = OrderTakeProfit();
                  //Lot size calculated by risk
                  if (!CloseEnough(RiskPercent, 0)) SendLots = CalculateLotSize(price, NormalizeDouble(stop + (HiddenPips / factor), Digits) );
   
                  result = SendSingleTrade(Symbol(), OP_SELLSTOP, TradeComment, SendLots, price, stop, take);
               }//if (!DoesTradeExist(OP_SELLSTOP, price))
               
            }//if (Bid - OrderOpenPrice() >= (MarketDistance / factor) )

   //Buy stops
   if (LatestTradeTicketNo > -1)   
      if (BetterOrderSelect(LatestTradeTicketNo, SELECT_BY_TICKET, MODE_TRADES))
         if (OrderType() == OP_BUY || OrderType() == OP_BUYSTOP)
            if (OrderOpenPrice() - Bid >= (MarketDistance / factor) )
            {
               price = NormalizeDouble(OrderOpenPrice() - (MarketDistance / factor) / 2, Digits);
               if (!DoesStopOrderExist(OP_BUYSTOP, price))
               {
                  stop = CalculateStopLoss(OP_BUY, price);
                  take = OrderTakeProfit();
                  //Lot size calculated by risk
                  if (!CloseEnough(RiskPercent, 0)) SendLots = CalculateLotSize(price, NormalizeDouble(stop + (HiddenPips / factor), Digits) );
   
                  result = SendSingleTrade(Symbol(), OP_BUYSTOP, TradeComment, SendLots, price, stop, take);
               }//if (!DoesTradeExist(OP_BUYSTOP, price))
               
            }//if (Bid - OrderOpenPrice() >= (MarketDistance / factor) )
      

}//End void FillGapWithStopOrders()

bool DoesStopOrderExist(int type, double price)
{

   if (OrdersTotal() == 0)
      return(false);
   if (OpenTrades == 0)
      return(false);
   
   
   for (int cc = OrdersTotal() - 1; cc >= 0; cc--)
   {
      if (!OrderSelect(cc, SELECT_BY_POS) ) continue;
      if (OrderSymbol() != Symbol() ) continue;
      if (OrderMagicNumber() != MagicNumber) continue;
      if (OrderType() != type) continue;
      if (!CloseEnough(OrderOpenPrice(), price) ) continue;
      
      //Got to here, so we have found a trade
      return(true);

   }//for (int cc = OrdersTotal() - 1; cc >= 0; cc--)
   
   
   //Got this far, so no trade found
   return(false);   

}//End bool DoesStopOrderExist(int type, double price)

Note there is an additional function.

Then do a search for:
if (MarketTradesTotal == 0)
and change it to:
if (MarketTradesTotal > 0)

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Peaky

Post by SteveHopwood »

I found a couple of unwanted extra stop orders and found the cause immediately. I was correcting both Peaky and FB this afternoon and the logic for each is similar but slightly different and I confused myself. It is always the fine details like these that drive coders demented. Or in my case, more demented.

The fix is in 1c in post 1.

DIYers, go to line 4228 in 1c. This:
if (OrderType() == OP_SELL || OrderType() == OP_SELLSTOP)

should be:
if (OrderType() == OP_SELL)

Also remove the OP_BUYSTOP conditional from line 4248.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Peaky

Post by SteveHopwood »

Peaky is mirroring my live manual trades perfectly.

Up-an-at-em, Tiger.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
TraderJoeForex
Trader
Posts: 1157
Joined: Fri Mar 08, 2013 10:29 pm
Location: South London

Peaky

Post by TraderJoeForex »

SteveHopwood » Mon May 29, 2017 10:12 pm wrote:Peaky is mirroring my live manual trades perfectly.

Up-an-at-em, Tiger.

:xm:
Following with interest. The speed with which you are progressing things is very inspiring :clap:
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Peaky

Post by SteveHopwood »

V 1d is in post 1.

I noticed that P was not sending in gap-filling stop orders when the market filled a stop order then reversed. I spotted the problem within seconds. Line 4561:
if (MarketTradesTotal == 0)

should be:
if (MarketTradesTotal > 0)

Unfilled stop orders will move with the formation of new peaks. It is market orders that get left behind.

That bloop apart, I am really pleased with Peaky - she has yet to take a trade that I would not have considered trading as I do, manually. The balance on the demo is up nearly 10% with DD that never rose above 5% whilst I was watching. It will not be long before this can go on my live account and I can go looking for a 5-10 pip scalping system to occupy the idle moments when I would previously been monitoring my live trades.

Good stuff. :clap: :clap: :clap: :clap: :clap:

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
cozybooks
Trader
Posts: 301
Joined: Wed Mar 27, 2013 1:33 am

Peaky

Post by cozybooks »

Steve, what a great addition this is! Manually on live trades I was using the Daily chart with a sixths bands indicator set to 78 periods, which is about three months, then checking it once a day and changing stop orders to just below the yellow line on my sixths indicator.

This lets it get automated on the 1 hour chart, although it does mean I won't get the chance to miss big trades by entered the wrong price on my stop orders the way I usually do. You are the best! :party:

I was being adventurous and patient and waiting for price to go all the way back to the opposite blue line before looking to close a trade, trying to capture hundreds of pips instead of just 100 or so, but I like the way you are doing it, so I think I will run half my trades on my long term plan, and the other half similar to the more reasonable (smarter) system you are doing.

I can't remember if I got this indicator from your forum, but I've included it in case anyone else is as visually dependent as me at seeing what the sixths lines are doing over time or where they were 6,12 or 24 months ago.

Thanks again! :clap: :clap: :clap:
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Peaky forum”