Slopey Peaky Stochy Bob

User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Slopey Peaky Stochy Bob

Post by SteveHopwood »

SERIOUS WARNING
  • Most Forex traders lose all their money.
  • Using the robot posted here in trading Forex does not guarantee success.
  • Trading this robot could lead to serious financial loss.
  • Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
  • This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
  • At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
  • To trade this robot, you have to understand:
MAKE SURE YOU READ THIS POST http://www.stevehopwoodforex.com/phpBB3 ... 41#p111241 There was a Forex bloodbath on Jan 15th 2015 that you need to know about.

You need the "SPB core library.mqh" file in your platform's Include folder. Download it from viewtopic.php?p=159559#p159559


This EA uses Stochastic to generate a trade in the direction indicated by your choice of Super Slope and Peaky inputs. It uses the Slopey Peaky Bob engine found at viewtopic.php?p=159559#p159559. Read SPB's User guide for information about everything apart from using the Stochastic indicator.

Stochy has two trading methods:
  • The cross from overbought/sold back into the main body.
  • From within the main body:
    • Stoch must be rising for a buy trade, and falling for a sell.
The other specific inputs are:
  • TradingMethod: tells Stochy whether to trade the cross or from within the main body.
  • EveryTickMode:
    • when true, Stochy will look for trading opportunities at every tick.
    • when false, Stochy will look for trading opportunities at the close of each candle.
  • The next 6 inputs represent those you would use when loading Stochastic onto your chart.
  • OverBought and OverSold are your choice of OBOS levels. The space in between is the 'main' area the Stochy will use if you choose the 'area' trading option.
  • CloseAtOppositeEnd: tells Stochy to close buys at your choice of OverBought and sells at your choice of OverSold.


:xm: :rocket:

Matters of general interest
Go here to download and run the script that will fill your platform's missing chart history: http://www.stevehopwoodforex.com/phpBB3 ... f=15&t=254
Read this post:
http://www.stevehopwoodforex.com/phpBB3 ... p?f=6&t=78 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration.

Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79, at the bottom of the post.

Useful utilities/EA's/scripts -

-
You do not have the required permissions to view the files attached to this post.
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. [email protected] 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
Dragonian
Trader
Posts: 129
Joined: Thu Aug 20, 2015 3:17 pm
Location: Wales

Slopey Peaky Stochy Bob

Post by Dragonian »

Hello Steve,

Great to have these new additions, thanks.

I notice that, whereas when using SPSwingyB the triggers "CP" and"FR" both show up as columns displayed as Solo signals, when using either SPStochyB or SPHGB neither the Stochastic nor the HGI triggers are shown, just the "PK" and "SS" columns. Is this correct?
TDesk 1.png
You do not have the required permissions to view the files attached to this post.
TTFN

Bill
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Slopey Peaky Stochy Bob

Post by SteveHopwood »

Dragonian » Thu Jun 27, 2019 1:46 am wrote:Hello Steve,

Great to have these new additions, thanks.

I notice that, whereas when using SPSwingyB the triggers "CP" and"FR" both show up as columns displayed as Solo signals, when using either SPStochyB or SPHGB neither the Stochastic nor the HGI triggers are shown, just the "PK" and "SS" columns. Is this correct?
Nope. I forgot to adapt the code. I have done so and they should now send "Sto" and "HGI" columns as appropriate, to TDesk.

:xm: :rocket:
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. [email protected] 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
Dragonian
Trader
Posts: 129
Joined: Thu Aug 20, 2015 3:17 pm
Location: Wales

Slopey Peaky Stochy Bob

Post by Dragonian »

Thank you Steve :hi:
TTFN

Bill
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Slopey Peaky Stochy Bob

Post by SteveHopwood »

I made a daft mistake with the closure code. I had buys closing at oversold and sells at overbought. This is fixed in post 1.

Easy DIY for those of you who enjoy it. Do a search for: //BB at 'wrong' end

There are two of them. The first block of code closes buys so replace the code with:

Code: Select all

      //Stoch at 'wrong' end
      if (!CloseThisTrade)
         if (CloseAtOppositeEnd)
            if (stoVal[pairIndex] > OverBought)
               CloseThisTrade = true;
 
The second block closes sells, so replace the code with:

Code: Select all

      //Stoch at 'wrong' end
      if (!CloseThisTrade)
         if (CloseAtOppositeEnd)
            if (stoVal[pairIndex] < OverSold)
               CloseThisTrade = true;
:xm: :rocket:
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. [email protected] 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: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Slopey Peaky Stochy Bob

Post by SteveHopwood »

Turn Stochy off for now folks. He is doing the rapid opening/closing of trades and I cannot see why.

:xm: :rocket:
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. [email protected] 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: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Slopey Peaky Stochy Bob

Post by SteveHopwood »

I had the conditional logic coded with all the skill of a geriatric poodle. Stochy is running correctly now, so please redownload from post 1.

DIYers, this is bitty. The easy bit first.
Do a search for: //Using the cross trading method.

Replace the next two blocks of cod with this:

Code: Select all

         //Using the cross trading method
         if (TradingMethod == cross)
         {
            //Cross long
            if (oldStoVal[pairIndex] < OverSold)
               if (stoVal[pairIndex] > OverSold)
                  stoStatus[pairIndex] = tradablelong;
                  
            //Cross short
            if (stoStatus[pairIndex] == untradable)
               if (oldStoVal[pairIndex] > OverBought)
                  if (stoVal[pairIndex] < OverBought)
                     stoStatus[pairIndex] = tradableshort;
                     
         }//if (TradingMethod == cross)
         
         //Using the trading area method
         if (stoVal[pairIndex] < OverBought)
            if (stoVal[pairIndex] > OverSold)
            {
               //Is sto rising?
               if (oldStoVal[pairIndex] < stoVal[pairIndex])
                  stoStatus[pairIndex] = tradablelong;
               else
               if (oldStoVal[pairIndex] > stoVal[pairIndex])//It is falling
                  stoStatus[pairIndex] = tradableshort;
                  
            }//if (stoVal[pairIndex] > OverSold)
Compare the above with the existing code before replacing if you want to laugh at my first effort.

Here is where it gets bitty. Scroll down to: if (SendToTDesk). Replace the entire block with this:

Code: Select all

         if (SendToTDesk)
            if (oldStoStatus[pairIndex] != stoStatus[pairIndex])
            {
               if (stoStatus[pairIndex] == untradable) PublishTDeskSignal("Sto",TradingTimeFrame,symbol,FLAT); else
               //We can go long if there has been a swing low
               if(stoStatus[pairIndex] == tradablelong)  PublishTDeskSignal("Sto",TradingTimeFrame,symbol,LONG); else
               //We can go short if there has been a swing high
               if(stoStatus[pairIndex] == tradableshort)   PublishTDeskSignal("Sto",TradingTimeFrame,symbol,SHORT);
            }//if (oldStoStatus[pairIndex] != stoStatus[pairIndex])
         oldStoStatus[pairIndex] = stoStatus[pairIndex];
               
      }//if (oldCandleReadTime[pairIndex] != iTime(symbol, CandleTimeFrame, 0) )
Compiling here will throw up a host of errors because you need a new array. I noticed that I had omitted a check that stops Stochy bombarding TDesk with unchanged signals so I have added an array to keep a note of each changed signal.

Do a search for: double stoVal[];
Insert this immediately underneath:
// TDesk code
string oldStoStatus[];//Prevents unchanged signals being sent to TDesk

Do a search for: ArrayResize(sellCashUpl, noOfPairs);
Insert this immediately underneath:
// TDesk code
ArrayResize(oldStoStatus, noOfPairs);

Do a search for: oldPrevCandleReadTime[cc] = 0;
Insert this immediately underneath:
// TDesk code
oldStoStatus[cc] = "";

Do a search for: ArrayFree(sellCashUpl);
Insert this immediately underneath:
// TDesk code
ArrayFree(oldStoStatus);

I have a horrible feeling that we are going to be reproducing this over the entire tribe. I am going to start checking.

:xm: :rocket:
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. [email protected] 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
c1borg
Trader
Posts: 454
Joined: Sun Aug 14, 2016 5:09 pm

Slopey Peaky Stochy Bob

Post by c1borg »

SteveHopwood » Tue Jul 02, 2019 2:50 pm wrote:
I have a horrible feeling that we are going to be reproducing this over the entire tribe. I am going to start checking.

:xm: :rocket:
Might be a very stupid question but im good at them :lol: does this effect Desky?
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Slopey Peaky Stochy Bob

Post by SteveHopwood »

c1borg » Tue Jul 02, 2019 3:25 pm wrote:
SteveHopwood » Tue Jul 02, 2019 2:50 pm wrote:
I have a horrible feeling that we are going to be reproducing this over the entire tribe. I am going to start checking.

:xm: :rocket:
Might be a very stupid question but im good at them :lol: does this effect Desky?
Nope.

:xm: :rocket:
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. [email protected] 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
tomele
Administrator
Posts: 1166
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Slopey Peaky Stochy Bob

Post by tomele »

SteveHopwood » 02 Jul 2019, 16:56 wrote:
c1borg » Tue Jul 02, 2019 3:25 pm wrote:
SteveHopwood » Tue Jul 02, 2019 2:50 pm wrote:
I have a horrible feeling that we are going to be reproducing this over the entire tribe. I am going to start checking.

:xm: :rocket:
Might be a very stupid question but im good at them :lol: does this effect Desky?
Nope.

:xm: :rocket:
It does not even affect TDesk. You can update your signals for TDesk as frequently as you want. TDesk reads them every 10 seconds. They are not working as a trigger forcing TDesk into any action when you update them without changing.
Happy pippin, Thomas :-BD

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.
(Mark Twain)

Keep the coder going: Donate
Post Reply

Return to “Super Slope EA's”