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

Slopey Peaky Bob
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5389
Page 61 of 84
Author:  Maximilian [ Mon Jun 17, 2019 2:06 pm ]
Post subject:  Slopey Peaky Bob

Hi,
delete the *.ex4 files. Then open the *.mq4 files in the metaeditor and recompile them.
That should fix it.
Max
Author:  Yannis [ Mon Jun 17, 2019 2:08 pm ]
Post subject:  Slopey Peaky Bob

I don't think I have that version, I can try if you attach it here, but I would bet the version is not the problem.
I can suggest a different approach, see if it works for you.

- Create a new folder in your C drive, like C:\TradingPlatforms, anything outside C:\Program Files.
- Install/copy an Empty4 platform in that folder.
- Once done, create a shortcut for the file Terminal.exe
- Right-click that shortcut, and in the 'Target' box, where it mentions for example the full path like C:\TradingPlatforms\GlobalPrime\terminal.exe, at the end, after terminal.exe, add a space and /portable

This will prevent Empty4 to create these 'hidden' folder under your user folder (which is highly restricted and secured) and it will keep the 'old' Empty4 folder structure, exactly where you installed the platform.

Copy your tools in their respective folders and restart your Empty4 using that shortcut (with the /portable at the end) and see if you get anything better.
Author:  Yannis [ Mon Jun 17, 2019 2:10 pm ]
Post subject:  Slopey Peaky Bob

I just saw Max's answer which of course is simpler and faster...
:smile:
Author:  rsquared1 [ Mon Jun 17, 2019 3:10 pm ]
Post subject:  Slopey Peaky Bob

Thanks guys,

I have tried all the things you mentioned.
Even tried to install it on three computers (PC, VPS & Lap).
The file (Slopy Peaky Bob v1w) in Post #1 cannot be opened ! :arrrg: :arrrg:
So there is no compilation and therefore there is no ex4 available.

Cheers
Roland
Author:  taipan [ Mon Jun 17, 2019 3:26 pm ]
Post subject:  Slopey Peaky Bob

rsquared1 » Mon Jun 17, 2019 11:10 pm wrote:Thanks guys,

I have tried all the things you mentioned.
Even tried to install it on three computers (PC, VPS & Lap).
The file (Slopy Peaky Bob v1w) in Post #1 cannot be opened ! :arrrg: :arrrg:
So there is no compilation and therefore there is no ex4 available.

Cheers
Roland

I think the include files are missing in your setup, see attached and try it up:
Author:  Maximilian [ Mon Jun 17, 2019 3:29 pm ]
Post subject:  Slopey Peaky Bob

Hi,
I just installed SPBv1w from first page without any problem. I don´t know, what´s wrong then.
:?:
Author:  taipan [ Mon Jun 17, 2019 3:32 pm ]
Post subject:  Slopey Peaky Bob

Slopey Peaky Bob.mq4
Slopey Peaky Bob.ex4
See the compiled 1w version on ex4 here and the source file:
Author:  Yannis [ Mon Jun 17, 2019 3:39 pm ]
Post subject:  Slopey Peaky Bob

OK, first things first.
1. When you put the file in the Experts folder, do you see it in the Terminal window under the Experts tab?
2. If you do see it, right-clicking and choosing "Modify", does it open with Metaeditor?
3. If it opens within Metaeditor, when you compile it, does it give any error? (it will give you a warning, you don't care)
I downloaded the EA, put it in a platform I don't use, did what I describe above and everything works like a charm... Just need to make sure you have the needed "include" files to compile it, and all the instruments traded in the market watch for the EA to open the trades.

Look in your Experts and Journal tab pages of the Terminal window, look if you find error messages that could shed some light.
2019-06-17_18-32-43.jpg
Author:  rsquared1 [ Mon Jun 17, 2019 3:58 pm ]
Post subject:  Slopey Peaky Bob

:!!:
Taipan, Yannis & Max, thank you again,
Taipans 1w-versions work. :hi:
Have completely forgotten the includes.... :arrrg:
Best regards
Roland
Author:  SteveHopwood [ Wed Jun 19, 2019 11:53 am ]
Post subject:  Slopey Peaky Bob

V 2p is in post 1. This has a check for the maximum number of orders that your broker will allow. SPB will abort sending the order if doing so would breech this limit. SPB displays this limit on your chart.

DIY: add this function somewhere convenient - mine is directly above bool isTradingAllowed(string symbol, int pairIndex):

Code: Select all

bool checkBrokerMaxTradesOnPlatform(int noOfTrades)
{

   int maxAllowedByBroker = (int) AccountInfoInteger(ACCOUNT_LIMIT_ORDERS);
   
   if (maxAllowedByBroker == 0)
      return(true);//0 = no limnit
      
   //Check for exceeding the limit
   if ((OrdersTotal() + noOfTrades) > maxAllowedByBroker)
      return(false);
      
   //Got here, so okay to send the order(s)
   return(true);      

}//End bool checkBrokerMaxTradesOnPlatform(int noOfTrades)

Go to bool isTradingAllowed(string symbol, int pairIndex) and add this at the top of the function:

Code: Select all

   //Max trades allowed by broker check.
   if (!checkBrokerMaxTradesOnPlatform(1) )
      return(false);
Go to: void sendBuyGrid(string symbol,int type,double price,double lot,string comment) //MJB
Add this to the top of the function:

Code: Select all

   //Max trades allowed by broker check.
   if (!checkBrokerMaxTradesOnPlatform(GridSize) )
      return;
Repeat the process in: void sendSellGrid(string symbol,int type,double price,double lot,string comment) //MJB

Go to: void displayUserFeedback()
Add this at the place you want the info displayed:

Code: Select all

   int maxAllowedByBroker = (int) AccountInfoInteger(ACCOUNT_LIMIT_ORDERS);
   sm("Maximum no of trades allowed on the platform, by your broker: " + IntegerToString(maxAllowedByBroker) );
:xm: :rocket:
All times are UTC Page 61 of 84