forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 4

Topic: MQL file addition

I wanted to add additional .mqh file with another class and method to FSBs MQL files. All I get is an error in FSB:

StartIndex cannot be less than zero.

When I copy the class directly to EA file, it works and compiles.

My question: there's no modularity and way for having additional .mqh files added to FSBs EA export function?

Re: MQL file addition

Hello Footon,

Please try the following:

- Add your file-name.mqh in the `C:\Program Files\Forex Strategy Builder Pro\User Files\MT4 Files\MQL\Forexsb.com` folder.
- FSB Pro will import the content after a line containing: //## Import Start
- Add the file name in the import list in `FSB_Expert_MT4.mq4`. Do that among the other import files between lines 102 - 117.

file-name.mqh

This will not be imported !!!

//## Import Start

;; FOO

;; This is imported :)

FSB_Expert_MT4.mq4

//##IMPORT Logger.mqh
//##IMPORT StrategyTrader.mqh
//##IMPORT file-name.mqh
//##IMPORT ActionTrade4.mqh

FSB Pro will include the necessary content in the exported expert at the proper place:

Exported expert:

      double stoploss  = moneyrisk / (lots * tickvalue) - spread;
      return ((int) MathRound(stoploss));
     }
//+------------------------------------------------------------------+

;; FOO

;; This is imported :)

#define TRADE_RETRY_COUNT 4
#define TRADE_RETRY_WAIT  100
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
class ActionTrade


Please open some of the standard mqh files to see how the "//## Import Start" tag is used. The purpose of this tag is  to make possible the MQH files to be used in both FSB Pro and MT. (Because MT requires file intro not needed in FSB Pro smile )

Re: MQL file addition

Added a proper error message:

https://image-holder.forexsb.com/store/incorrect-mqh-file-thumb.png

Re: MQL file addition

This is nice, thank you, Miroslav!

Now I can envisage using custom libraries as well. I'll carry on.

Posts: 4

Pages 1

You must login or register to post a reply

Similar topics in this forum