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

Ghostrider
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5942
Page 7 of 12
Author:  trader689 [ Wed Nov 18, 2020 1:16 pm ]
Post subject:  Ghostrider

Brilliant, thanks Steve, looks like we're onto a winner with this one, the spidy-sense (dampened and scarred by years of retail-forex battle) is tingling :good:

trader
Author:  SteveHopwood [ Wed Nov 18, 2020 3:41 pm ]
Post subject:  Ghostrider

Folks, if you want to get something going quickly use the attched TDesk and Ghostrider templates. This trades the M15, with M5 SupDem and D1 high time frame ZZ.

:xm: :rocket:
Author:  SteveHopwood [ Wed Nov 18, 2020 4:13 pm ]
Post subject:  Ghostrider

I have added details of four demos in post 1.

:xm: :rocket:
Author:  r1ch4rd [ Wed Nov 18, 2020 4:49 pm ]
Post subject:  Ghostrider

wallywonka » Tue Nov 17, 2020 9:17 pm wrote:
r1ch4rd » Mon Nov 16, 2020 2:33 pm wrote:
wallywonka » Sun Nov 15, 2020 7:33 am wrote:
Not too bad for the first week on a live account. :smile:


Please could you share your set file Wally
My test results haven't been anywhere near as good as yours. :arrrg:
I'm still tweaking and testing, when I have something that I am 100% confident in I will share it here. I am testing on 4HR timeframe only. I can say this week so far has not been so good thus far.

Fair enough,
I too am testing H4 with H1 SD/etc trigger. So far this week I have a little bit more success with my tweaks. Time will tell.
Author:  wallywonka [ Thu Nov 19, 2020 7:12 am ]
Post subject:  Ghostrider

r1ch4rd » Wed Nov 18, 2020 4:49 pm wrote:
Fair enough,
I too am testing H4 with H1 SD/etc trigger. So far this week I have a little bit more success with my tweaks. Time will tell.
Exactly, like everything it needs a good amount of testing time. After some losses to start the week I am now back in positive territory which is good.
Author:  Maximilian [ Thu Nov 19, 2020 7:50 am ]
Post subject:  Ghostrider

SteveHopwood » Wed Nov 18, 2020 11:58 am wrote:Ghostrider has morphed, folks. He is substantially different so we are back to listing it as Version 1.

c1bork gave me a couple of extra tips and I have added these to the new version. You will find full details in the updated user guide but to summarise:
  • Only take 'confirmed' ZZ swings i.e. dots that remained in place at the close of two bars ago.
  • Then the candle following the ZZ signal comes into play:
    • Buy trade following a ZZ swing low: candle must have risen and closed higher than 50% above its low.
    • Sell trade following a ZZ swing high: candle must have fallen and closed lower than 50% below its high.
I give examples of the candle thingy in the user guide.

These trades can travel a long distance, so grid trading makes sense to me. I have introduced it into Ghostrider. The inputs are just below the Volumes inputs. Coders will see that all the usual inputs from Trendy, SPB et al are there but mostly hidden. This is so we can easily call them into play if wanted.

Dump your previous versions folks and restart your demos.

:xm: :rocket:
Good Morning :) ,
I started testing. So far so good, but I had one pair which hit SL and the grid of pendings didn´t get deleted. If this is intended, then I woud ask you to make it optional.
Cheers Max
Author:  SteveHopwood [ Thu Nov 19, 2020 7:57 am ]
Post subject:  Ghostrider

Maximilian » Thu Nov 19, 2020 7:50 am wrote:
SteveHopwood » Wed Nov 18, 2020 11:58 am wrote:Ghostrider has morphed, folks. He is substantially different so we are back to listing it as Version 1.

c1bork gave me a couple of extra tips and I have added these to the new version. You will find full details in the updated user guide but to summarise:
  • Only take 'confirmed' ZZ swings i.e. dots that remained in place at the close of two bars ago.
  • Then the candle following the ZZ signal comes into play:
    • Buy trade following a ZZ swing low: candle must have risen and closed higher than 50% above its low.
    • Sell trade following a ZZ swing high: candle must have fallen and closed lower than 50% below its high.
I give examples of the candle thingy in the user guide.

These trades can travel a long distance, so grid trading makes sense to me. I have introduced it into Ghostrider. The inputs are just below the Volumes inputs. Coders will see that all the usual inputs from Trendy, SPB et al are there but mostly hidden. This is so we can easily call them into play if wanted.

Dump your previous versions folks and restart your demos.

:xm: :rocket:
Good Morning :) ,
I started testing. So far so good, but I had one pair which hit SL and the grid of pendings didn´t get deleted. If this is intended, then I woud ask you to make it optional.
Cheers Max
Thanks Max. This is an error of omission on my part as I had not even considered this possibility. Fix coming soon.

:xm: :rocket:
Author:  SteveHopwood [ Thu Nov 19, 2020 8:36 am ]
Post subject:  Ghostrider

The fix is in 1a in post 1.

For code checkers and DIY enthusiasts, add this function somewhere. I put mine immediately above OnTick() but it does not matter:

Code: Select all

void shouldStopOrdersBeDeleted()
{

   /*
   Delete 'orphaned' stop orders when a filled trade hits SL.
   How to detect this:
      - there will be no market trades
      - there will be <= GridSize stop orders in place. GridSize + 1
        stop orders will show that none have filled yet, so
        deletion is not required
   */
   
   bool closeNeeded = false;
   
   //Buy stop orders
   if (BuyStopOpen)
      if (BuyStopsCount <= GridSize)
         if (MarketBuysCount == 0)
            closeNeeded = true;
   
   //Sell stop orders
   if (!closeNeeded)
      if (SellStopOpen)
         if (SellStopsCount <= GridSize)
            if (MarketSellsCount == 0)
               closeNeeded = true;
               
   //Is deletion needed?
   if (closeNeeded)
   {
      CloseAllTrades(AllTrades);
      
      if (ForceTradeClosure)
         CloseAllTrades(AllTrades);
      
      if (ForceTradeClosure)
         CloseAllTrades(AllTrades);
      
   }//if (closeNeeded)
          

}//End void shouldStopOrdersBeDeleted()
To add the call to the function, do a search for:
//Find open trades.

Insert this underneath the CountOpenTrades(); command:

Code: Select all

//Deal with 'orphaned' stop orders in the grid after hitting stop loss
   if (UseGridTrading)
   {
      ForceTradeClosure = false;
      shouldStopOrdersBeDeleted();
      if (ForceTradeClosure)
         return;//In case a closure failed, try again at the next tick.
   }//if (UseGridTrading)
This will also deal with any stop orders left behind by previous stop loss episodes.

:xm: :rocket:
Author:  Maximilian [ Thu Nov 19, 2020 8:41 am ]
Post subject:  Ghostrider

:smile:
Author:  SteveHopwood [ Sun Nov 22, 2020 11:46 am ]
Post subject:  Ghostrider

V 1b is in post 1.

I was finding last week that the accounts were going several hundred dollars into the green then giving it all back before positions closed. I have added the feature that sets a take profit for the initial trade and this is copied into the grid stop orders. I have reduced the number of grid orders from 5 to 3, and set the TP c. 10 pips above/below the fill price of the third order.

:xm: :rocket:
All times are UTC Page 7 of 12