FAQ

EA Inputs

How many trades will a VTS Expert Advisor open at one time?

By default, an VTS Expert Advisor (an EA built by VTS) will only open 1 trade at any one time.

This is governed by these VTS built-in input variables:

  • MaxTrades
  • MaxBuys
  • MaxSells

These are all set to 1 by default, but they can be changed at any time.

How do I use an MQL Input parameter in a Logical condition?

Question:

I am trying to assign an indicator, let’s say RSI, as an input in my EA. Then I want to use it in my Logic. So, the logic will go as “OpenBuy/OpenSell if RSI value is equal to InputRSI” (where InputRSI will be Input-based).

Answer:
I. Create the variable
There are 2 ways to define an “input”  for your Expert Advisor:
(1) Drag, drop and connect a variable element & then set the scope set to “extern” (extern is the keyword used in MQL to define any variable as an input to the EA)
or
(2) Use the Input Manger to create a new input.
For example, create an input variable named “MyRsiValue” and set its value to 75.0
II. Create the RSI function
Drag and drop the iRSI function from the Function Toolbox

 

III. Create the Logic

From the Toolbox NEW pane, drag and drop a Logic Element.

 

Press the (+) button to configure the Logic Element

Set the condition as follows: “if the value of the RSI function is greater than my input value, return true”

 

Notes:

  • The variable MyRSIValue should be defined with a data type as a “double” to support a decimal number like 75.0
  • Connect the Elements as you add them to the pad so they are visible from the Choose menus.
  • Use the Choose menu to set the names of the operands in the Logic if you are not comfortable typing them.
How do I set an MQL Indicator parameter as an Input to my Expert Advisor?
There are 2 ways to define an “input”  for your Expert Advisor:
(1) Drag, drop and connect a variable element & then set the scope set to “extern” (extern is the keyword used in MQL to define any variable as an input to the EA)
or
(2) Use the Input Manger to create a new input.
 For example, create an input variable named “MyRsiPeriod”.
After creating the variable, set that variable, by name, into the parameter value entry box.
For example, for the “period” parameter of an iRSI function, set the value to “MyRsiPeriod”.

Also, Step 6, on this page shows how it is done:

Errors

Errors! Help. Is there a way to debug an EA? Does any debugger for MQL4 exist?

How to Fix a Broken EA

Sorry, there is no built-in debugger for MQL4.

But, here is some information that will help you solve any issue:

1. Expert Advisor will not Build?

Read this post if your Expert Advisor will not compile because of MQL syntax errors.

2. Expert Advisor will not Trade?

Read this post to find out the most common reasons an EA will not trade.

3. Need to Debug your EA?

Read this post to learn how to debug an EA using VTS.

 

What is the Ordersend error 130 I see from my MetaTrader platform window?

Ordersend error 130  is an “Invalid stops” error.

Check the stoploss and takeprofit values to make sure they are good for your  platform & account type.

Variable name too long for MetaTrader MT4 compiler

The maximum length for the name of a variable for MT4 appears to be 30 characters.  (This value may change, but there will always be some maximum)

The error message is pretty clear:

‘v1234567890123456789012345678901’ – too long variable name C:\Program Files (x86)\MetaTrader 4\experts\exits.mq4 (4, 5)

It should not be easy to give a variable a name that is too long using VTS.

Most VTS entry screens  prevent you from creating a variable or function with too long of a name, but occasionally it does happen.

If it does, delete the variable from the toolbox by right-clicking and selecting delete. And then delete all references (all Elements on the drawing pad) of the variable.

If you still have trouble, follow these steps:

1. Remove the variable/s from the input list.
2. Close VTS.
3. Go to this folder:
    C:\Program Files (x86)\iExpertAdvisor\Visual Trader Studio Connect\elements\user\variables\<NAME OF SYSTEM>
(may not have the (x86)
 
4. Delete the file/s that match the name/s of the variable:
 
5. Restart VTS.  There should be no reference to the variable and the build will not break for that reason.

 

 

Functions

Is it possible to use an indicator as a stoploss?
Yes – it’s easy to do.
On the window for opening an order there is a button to use an “offset” or a “price value” for the stoploss and takeprofit values.
An offset is a typical value like “20”, “50”, etc
A price value can be the value of any technical indicator such as Moving Average, Bollinger Band – even a Close price or a channel high or low.
This will use the indicator as a stoploss. You can import any of your custom indicators into VTS and then use them just like the MQL built-in indicators.
Note: a custom indicator can be used as well.
Here is a link to more info:

 

How can I create a MetaTrader Trailing Stop that is X pips below the low of a Bar?
The fnOpenOrder function offers a trailing stop parameter with a check box for using an “Absolute value (price)”.
So, for the “Absolute value (price)” you want to set the lowest low minus x pips:
1.   Use the fnGetLowest function to get the lowest value (it’s on the Bar menu)
2.   Create a variable and set it to the value returned by your fnGetLowest function, probably _fnGetLowest1 (use the choose button to find it)
      (Note: the name of the variable that holds the value returned by a function is the name of the function preceded with an underscore).
        On the Assignment tab, use the “Apply an Offset” checkbox to subtract X points (in this case, multiply the value by point: *Point)
        Name the variable MyLow
3. In the fnOpenOrder function, check the “Use trailing stop” &  “Absolute value (price)” & enter MyLow for the value.

 

How can I see the value of an MQL function or variable when my EA is running?
Open the variable (or MQL function) Element, go to the message tab & check ‘send message’ and check ‘write value of Name’.
Then run the EA (on your  demo account) and watch the ‘experts’ tab in the MT platform to see what the value is.

Where are the CandleStick pattern functions?
1. Make sure your version of VTS is at least 4.0.0.37 (In VTS, go to Help->About)
2. Check the Candlestick feature status in the license tab. In VTS, go to Tools->Options->License.
3. The Candle Functions are found in the ToolBox, in the Functions panel, under the menu CandleSticks.

General

How can I create a Strategy Template

How can I create a Strategy Template:

In VTS, with the system open that you would like to create a template from

Go to Tools -> Package & Share
Check “Save as Strategy Template”
Then select save -> Save & Close

Next time you open VTS
The system will appear in the “Create New System” section of the Welcome page.

Clicking the button on the Welcome screen will create a new system
based on your original system.

The behavior is just like clicking the Cross over Strategy
from the Welcome screen.

 

How to Email a VTS System

The above process of creating  a Strategy Template will create a  *.zip file in the this folder:

C:\Program Files \iExpertAdvisor\Visual Trader Studio for MetaTrader\Data\Packages
(This may be different if you installed VTS in a folder besides “Program Files” or “Program Files(x86)”)

The zip file maybe attached to an Email.

Also, the zip file may be opened in VTS by using the “Open Existing System” on the Welcome Screen.

 

 

 

 

Do I Own the Copyright to my Expert Advisor?

Yes, you do.

Here is a link to a post on how to set the company name and copyright values for your Expert Advisor:

http://expert-advisor-builder.com/expert-advisor-ownership/

Is it possible to build an Alert-Only Expert Advisor?

Is it possible to build an Alert-Only Expert Advisor?

Yes, it is. See this post: How to Build an Alert-Only Expert Advisor

 

How do I copy my Expert Advisor to another platform?

When you click the build button in the VTS application two things happen:

  1. VTS converts the drawings into MQL code.  VTS creates a file with the same name as the VTS system except with a “mq4” extension. For example: system1.mq4.
  2. VTS uses your MetaTrader platform to build an Expert Advisor from the MQ4 file. This file is the EA and has an “ex4” extension. For example: system1.ex4

These files (the MQ4 and EX4) are created in your MetaTrader platforms “experts” folder. For example:

C:\Program Files (x86)\MetaTrader 4\experts

To copy your EA to another platform, just copy the EX4 file to the “experts” folder of the other platform. You may need to restart your MT platform for the EA to appear under the “expert advisor” tab in the MT navigator window.

One of the features of the Mutli-Platform & Script plug-in is an automatic copy of your EA to multiple MT Platforms.

 

How do I delete a VTS Element?

To delete a VTS Element from the drawing pad, select the Element and then press the Delete key on your keyboard.

To delete a VTS  Element permanently from the system, find the Element in the ToolBox, right-click with your mouse and select Delete.

 

Can VTS import an MQL4 file?
We discontinued support for MQL4 import.
The reasons:
    1. It was not very useful when it worked. Except for very simple EAs, the drawings were just about as confusing as the MQL code.
    2. It did not always import correctly. There are so many different ways to write valid MQL code that resulted in incorrect drawings.
So, when we updated VTS 3.x to VTS-Connect we did not include the MQL import function.
However we do make the older version of VTS available to customers of VTS-Connect, so the MQL import function can be used that way, but we don’t recommended or support it.
We may eventually bring it back if demand for it increases.  If MT5 ever takes off, it could be useful as a way to convert from MT4 to MT5.
How can I learn more about all of the MetaTrader functions?

The MetaEditor provides great help on all of the MetaTrader functions.

You can learn how to use it here:

http://www.iexpertadvisor.com/connect-help/html/index.html?mqlhelp.html

How can I run VTS as administrator?
To run VTS as administrator:

  • On the VTS desktop icon, right-click, select “Shortcut”,
  • then select “Advanced …”,
  • then check “Run as Administrator”
You may need to do run VTS as admin if you are experiencing permission problems related to the User Access Control (UAC) policy on your PC.
UAC problems occur often on Windows Vista.
Do I need the TrendLine plug-in for the TrendLineAlert EA?
No, you do not need the TrendLine Plug-in for the “Trend Line Alert” EA to work.
The “Trend Line Alert” EA can monitor multiple hand-drawn trend lines on multiple charts.  When a line is broken, an alert is generated.  Also, logic can be defined so that lines on multiple charts must be broken for the alert to be generated.  This is a stand-alone product.
 
The TrendLine Plug-in works with VTS. It can determine if a hand-drawn or programatically drawn trend line has been broken. The logic can be used to open/close/modify a trade, send an email, etc.
I can’t load the Metatrader platform or the Metaeditor inside VTS

First, make sure your MT Paths are set correctly. See here for details:  http://www.iexpertadvisor.com/connect-help/html/mtpaths.html

When you select the Editor or Platform buttons on the top of the VTS application, VTS simply calls the executable file and attempts to load it into a VTS tab.

On some windows systems, the call to load the MetaTrader executable file (terminal.exe or metaeditor.exe) fails. The reason is not always clear, but it is probably related to User Access Permissions (UAC).

The buttons are just for convenience, you can always open the platform or the MetaEditor from outside of VTS.

 

How do i find the minimum version requirements for a VTS Plug-in

Generally, each plug-in has a minimum VTS version that is required to support the plug-in.

When you log into the members area, you will see the minimum version listed next to each of your plug-ins.

To determine what version of VTS  you are running, in VTS go to Help->about

To upgrade, in VTS go to Help->Check for updates
The best practice is to simply always have the latest version.
To make sure you get all emails related to VTS updates, use the sign-up box inside the members area.
(Note: not all plug-ins require additional code downloads.)
How do I update VTS?

There are two ways to update VTS:

  1. Log in to the members area and download & run the latest installation file.  The members area log in is on the bottom left corner of our home page at www.iExpertAdvisor.com
  2. Or, in VTS, go to Help->Check for Updates and follow the prompts.
How to Update Visual Traders Studio (VTS)

How to Update Visual Traders Studio (VTS)

How can I find out the version of VTS?

To find the VTS Version, in VTS, go to About->Help

How can I get the VTS Free Trial?
The VTS Free Trial is available on our website. You can signup right from our home page here:

 

How do I know the Power plug-in is enabled?
When the power plug-in is enabled, any indicator that has a shift parameter will have a power tab on its configuration window.  Also, any Logic element will also have  a power tab on it’s configuration window.
Here is a link the help:

Will VTS work through a proxy server?

Yes, VTS should work through your default proxy server.

Here are some advanced instructions for manually setting a specific proxy server if you can not use your default proxy server.

In the VTS install folder there is a file named “vApp.exe.config”.
Your VTS install folder is probably here:
C:\Program Files (x86)\iExpertAdvisor\Visual Trader Studio Connect\vApp.exe.config
 
You can add proxy info to this file.  
 
 
If you need to specify the proxy’s name and port, add this after the first <configuration> tag:
 

<system.net> <defaultProxy> <proxy proxyaddress="http://[proxy address]:[proxy port]" bypassonlocal="false" /> </defaultProxy> </system.net>

You replace [proxy address] with your proxy name & [proxy port] with your port.

The “vApp.exe.config” can be edited using notepad or any other text-only text editor.
The entire file might look like this:
<?xml version=”1.0″?>
<configuration>
 
   <defaultProxy enabled=”true” useDefaultCredentials=”true”>
     <proxy usesystemdefault=”true” bypassonlocal=”true” />
   </defaultProxy>
 
<startup>
<supportedRuntime version=”v2.0.50727″/>
</startup>
 
</configuration>
 
How can I remove all of my data from VTS?

All of the data created by a user when creating VTS systems is stored under this folder:

C:\Program Files (x86)\iExpertAdvisor\Visual Trader Studio Connect\elements\user
You can delete this folder to remove all of your the data if needed.
Also, you can archive this folder if you want to save all of your work to another location.
Occasionally VTS will fail to start, or start slowly. An easy way to determine if this is because of a data file is to move this folder.
Note: It is not sufficient to change the name of the folder. It must be removed outside of the VTS installation folder (C:\Program Files (x86)\iExpertAdvisor\Visual Trader Studio Connect\)
Manual work-around for MT Paths

If you are having a lot of trouble setting the MT Paths to the correct the locations of your MetaTrader platform, there is a manual work-around.

You can edit this file with the correct values:
     C:\Program Files (x86)\iExpertAdvisor\Visual Trader Studio Connect\cfg\settings.txt
Look for these lines, enter the correct folder, then save the file and restart VTS.
Platform=C:\Program Files (x86)\MetaTrader 4\terminal.exe
Editor=C:\Program Files (x86)\MetaTrader 4\metaeditor.exe
Builder=C:\Program Files (x86)\MetaTrader 4\metalang.exe
Only do this as a last resort, since any errors in this configuration file may cause strange results.

 

Will VTS interfere with my current Expert Advisors?
No, installing VTS will not interfere with your other Expert Advisors.
But do not overwrite an EA by creating one with the same name:
When you create a new system in VTS, the default name is something like “system1”, “system2”, etc.
When VTS builds an EA it will create an MQL file named system1.mq4.
So just be sure not to name your VTS system by the same name as any of your existing EAs.
How can I get the latest versions of the VTS EA Builder and/or my Plug-ins?

Log into the members area from our homepage www.iExpertAdvisor.com

Once in the members area, you can access all of your products.

If you have forgotten your password, there is a link to reset it.

Can I change my email address?

We use the email address used to purchase to create your account.  We don’t have an automated method to change your email address.  If you really, really need to change the address, let us know and we will do it manually.

Where is the latest VTS-Expert Advisor Builder Help file?

The latest help files are always at this link:

http://www.iexpertadvisor.com/connect-help/html/

Pre-Sale, or Before-I-Buy Questions

Most of your pre-sale questions about the VTS Expert Advisor Builder are answered here:

http://www.iexpertadvisor.com/FAQ/

Indicators

How can I reuse an Indicator? I’m tired of changing the CCI period from 15 to 14 every time.

Question:

How can I change the default values of the indicators I add to my systems. For example, when I add the CCI indicator to my system, I always have to change the default value of CCI Period from 15 to 14. Is it possible to change it forever?

Answer:

When you first configure your CCI, name it & save it as something like “CCI_14“.

The go to the Function toolbox, under the name of the system you will find “CCI_14“.

When you need to, drag & drop the CCI_14 function.

Notice when you drag and drop the CCI_14 function on to the pad, VTS does not rename it.  The function name remains CCI_14.  You truly have more than one copy of the CCI_14 function on the drawing.

This means if you change any parameters values of the CCI_14 function, the changes will be reflected in all copies of the CCI_14 function.  If you don’t want this behavior, use a different named function.

If you want the CCI_14 function to be available outside of the current system, add it to the Favorites menu by right-clicking the function in the Toolbox and choose “Add to Favorites”.

 

 

 

How do I get the signal value of the MACD indicator?

Question:

How can I create a variable that defines only the signal of the MACD indicator. I want to to put a logic in which the MACD signal line is crossed up or down.

Answer:

Use the mode parameter to get the Signal value for the MACD.  VTS will populate a pull-down menu with the allowable values.

 

VTS will populate the mode parameter menu for all MQL indicators that support the mode parameter (ADX, Stochastic, MACD).

Basically, any indicator that displays more than one line when you add the indicator to a price chart will have a mode parameter.

Also, this is a good time to name the function appropriately, something like MACD_signal

After you connect the function and save the drawing, the MACD_signal value will be available from the Choose menu to use in a logical condition.

 

What’s with the names of the Indicator functions? iRSI2, iStochastic1?

Question:

When I choose indicators to add to my system some of them end in number 1, and some in number 2 (for example, iRSI2, iStochastic1). What is the difference, and what do these numbers mean at all?

Answer:

VTS generates a name each time you drag and drop an indicator function onto the drawing pad. It simply takes the base name of the indicator and adds a number to the end to get the next available name.

Each function in a VTS system must have a unique name, this is just a first guess.

You, as the system developer, should give all variable and function names a descriptive name.  A good name goes a long way.

For example, an iMA (moving average) function with a period of 6 may be name FastMA.

Some traders will add the parameter values to the name: RSI_12

 

Logic

How can I assign different values to an MQL variable based on logic?

You can just drag and drop the same MQL variable Element onto the true & false outputs of a Logic element & set the value accordingly using the assignment tab.

 

After a variable has been saved, it is available in the Variables ToolBox, under the name of the system it was created in. So you can drag the variable from there to where ever it is needed.

 

Is VTS able to determine the color of an MT4 custom indicator and implement in the logic function?
Yes, tt is possible to determine the color of an MT4 custom indicator, but it can be challenging.
This is a forum post on the subject:

 

Can I have multiple links come from an Element?

Yes, VTS supports multiple Links.

You can have more than 1 output link on any Element, and you can number each link to control the order of execution.

You can learn more here from the VTS help file:

http://www.iexpertadvisor.com/connect-help/html/links0.html

Can I open trades on a Metatrader H1 chart but make trading decisions based on H4 timeframes?
Yes, that is possible and it is very easy.
  • The EA will open trades on the chart it is attached to, so attach your EA to the MetaTrader H1 chart.
  • In VTS, you just use the pull-down menu to choose the H4 timeframe for the indicator. The EA will use the 4H timeframe to calculate the indicator regardless of what chart the EA is attached to.

Every indicator configuration window in VTS allows you to explicitly choose the timeframe:

How do I count bars back with the close price above or below a moving average?
  • The “shift” parameter is used for iMA (the moving average function or any indicator) to get a value from any “bars back”

http://www.iexpertadvisor.com/connect-help/html/index.html?order.html

  • The Close price for bars back is accessed like this: Close[0], Close[1], Close[2] …
  • Use the built-in function Point if you want to convert from an integer number  like 20, to a pip value:

For example, in the assignment field of a variable type:  20 * Point

  • Use the function fnOpenOrder to set s/l, t/p and trail.
  • Reverse the logic in the “Close*Order” drawings to close trades (uses fnOrderClose)
Here is a link to a step-by-step tutorial:

 

How to open a trade when the price is X points above the High price of an MT Candle?
How can I:
“Open a Buy trade when the Ask price is N points below the ‘Lowest Low’ in the last M bars”
“Open a Sell trade when the Bid price is N points above the ‘Highest High’ in the last M bars”
Answer:
1. use the function fnGetHighest/Lowest from the toolbox under the “Bar” menu.
2. Create a variable (name it something like MyHigh) and perform the math in the “assignment” tab:
To add an integer number of points, use the MQL variable ‘Point”. Here is an example for 15 points above the highesst high:
_fnGetHighest1 + (15 * Point)
(OR use the new “Apply an offset” feature)
3.
add to the open buy logic:
  Ask GREATER_THAN MyHigh

 

Find 80% range of a Bullish Bar
How can I identify bars that are:
  • 100 pips tall from LOW to HIGH
  • bullish bar
  • the OPEN minus the CLOSE comprises 80% of the bar

Answer:

1. Create a Variable, with a type of ‘double’ and name it “range1”

in the assignment field enter:
(High[1] – Low[1])*0.80
2. Create a Variable, with a type of ‘double’ and name it “range2”
in the assignment field enter:
(Close[1] – Open[1])
3. Connect these Variables in from of a logic and add these conditions to the logic:
High[1] GREATER_THAN Low[1]
and
Close[1] GREATER_THAN Open[1]
and
range2 > range1

 

How can I get the range of a MetaTrader hourly bar?
These steps will get the range of any MetaTrader bar.
1.  price values for bars can be accessed using these MQL built in functions (where index is the shift of the bar)
Close[index]
Open[index]
High[index]
Low[index]
2. Create a variable and perform the math is the “assignment” tab:
This will yield the difference between the 2 close values in Pips:
Close[1] – Close[2]
(Note: you could also get the difference between the open & close as Open[1] -Close[1])
To convert the value to an integer number, divide by the MQL built-in variable Point:
(Close[1] – Close[2])/Point
This assumes Close[1] is a larger number than Close[2]. If not, the result will be negative. You can always add a logical condition to a Logic Element to check if the value is less than zero.
How do I check for a simple crossover between two indicators?

1. Drag, drop, connect and configure your two indicators functions.

For example:

  • Drag & drop a moving average (iMA), set its period to 6 and save it as FastMA
  • Drag & drop another moving average (iMA), set its period to 21 and save it as SlowMA

2. Drag, drop and connect a Logic element.

Configure the logical condition:

Set the left operand to _SlowMA

Set the right operand _FastMA

Set the operator to CROSS_UP

This logic will check if the SlowMA has crossed up through the FastMA,

 

 

How to “Open a Buy trade when the Ask price is N points below the ‘Lowest Low’ in the last M bars”

Question:

How do I Open a Buy trade when the Ask price is N points below the ‘Lowest Low’ in the last M bars”?

Answer:

6 easy steps

1. When you first create your VTS system, check the box to create a OpenBuyTrade drawing:

2. On the OpenBuyTrade drawing, drag, drop and connect the fnGetLowest function and a new variable named MyLow

(fnGetLowest  is found in the Functions Toolbox under the Bar menu)

3.  Configure the fnGetLowest function, set the endbar parameter to your M value: (M=12)

4. Configure the MyLowest variable to hold the lowest value minus N points: (N=25)

5. Add the logical condition to IsOpenBuyTrue:

6. Build and Test!

Order Management

Why does my EA close all trades immediately?
There could be many reasons. Please inspect your close logic.
The EA will close an order based on:
  • stoploss
  • takeprofit
  • or close logic.
If the EA was not supposed to close the trade according to your logic, please inspect the criteria of the logic elements on the drawings CloseBuyLogic and CloseSellLogic.
If you do not want the trade to be re-opened on the same signal, use the signal manager. Here is a link to the help:

If you want your EA to close all of your open trades, use the function fnCloseAll.  The fnCloseAll  function is found in the Function’s Toolbox, under the Trade menu.

 

Should my EA sleep and wait on the isTradeContextBusy MetaTrader function to open an Order?

Probably not.

The MQL code usually looks like this:

while(IsTradeContextBusy())

            Sleep(100);

RefreshRates();

I’m not a fan of sleeping in a while loop – the code can hang forever.  The while loop is rarely needed: An EA is executed on each tick, so if the order fails, it’s retried on the next tick, usually in less than 1 second.  

 
One exception is when the EA is trying to open an order for a currency pair other than the chart it is on. In this case, since the EA is running due to a tick from a different currency, the EA can be exposed to a delay.
 
Another case is when the EA is executing ** a lot ** of code. It runs for so long that the prices change while it is running.  The MQL RefreshRates function makes a request to get the latest prices – this is like requesting a tick.
An important point is that the delay experienced in an EA (and almost all programs) is not due to waiting for processor execution, but usually waiting on I/O (input/output).  In this case the network IO. So it’s very rare to have an EA execute that long – unless you call the sleep function! 
(By the way, the isTradeContextBusy MetaTrader function returns true only when another one of your EAs is trying to open a trade.)

 

Is there a way to disable Takeprofit and Stoploss in VTS when creating an EA?
You can use the “fnOrderModify” function to set the limits to zero after opening the trade.  Attach it on the pad after the “fnOpenOrder” function
This will only work if your broker allows this.   Not all brokers allow zero for the stoploss or takeprofit values.
The other option is to set the limits excessively large so that the logic to close the trade will occur before the limit is ever reached. This will effectively disable the Takeprofit and stoploss. 
We are working on a “Client-side stops” Plug-in that will hide your stops from your broker.  Check our product page if you are interested: VTS MetaTrader Plug-ins
How do I create a Trailing Stop that is X pips below the prior bar’s Low?
The fnOpenOrder function offers a trailing stop parameter with a check box for using an “Absolute value (price)”.

So, for the “Absolute value (price)” you want to set the lowest low minus x pips:
1.   Use the fnGetLowest function to get the lowest value (it’s on the Bar menu)

2.   Create a variable and set it to the value returned by your fnGetLowest function, probably named _fnGetLowest1 (use the choose button to find it)
 (Note: the name of the variable that holds the value returned by a function is the name of the function preceded with an underscore).
On the Assignment tab, use the “Apply an Offset” check-box to subtract X points (in this case, multiply the value by point: *Point)
Name the variable MyLow

3. In the fnOpenOrder function, check the “Use trailing stop” &  “Absolute value (price)” & enter MyLow for the value.

Strategies

Is there a Cross Over trading strategy? What is it?

Yes. On the Welcome screen, in the Create new system group there is an icon to create a new CrossOver system.

This will create a VTS trading system that uses a moving average crossover to open and close trades.  It can be used as a starting point for a system, or just as an example for learning.

System Managers

Is there a function available to limit the generation of a new trade for so many bars/so many minutes after a prior trade has expired ?

Yes, the TradeSignal Manager can be used to delay the opening of subsequent trades.

 

 

The delay can be candle-based or minute-based:

 

How can I limit EA to 1 trade per candle?

You can limit your EA to 1 trade per candle using the TradeSignal Manager to limit the next trade.

  • check NEXT_SIGNAL_RULE_DELAY_CANDLE
  • enter 1 for the delay value

 

Easy Email & Communication Manager, (MetaTrader SendMail)

What events can be used to send emails?

The events that are supported through the Communication Manager are:

EA_Started,
EA_Stopped,
TradeOpened,
TradeClosed,
AccountBalanceAbove,
AccountBalanceBelow,
AccountMarginAbove, **
AccountMarginBelow   **
** – these are the margin levels
Also, you can connect logic together to create virtually any event that will send an email.
These events will use the MetaTrader 4 MQL function SendMail. Or if you have the Easy Email plug-in it will use the EasyEmail function to send the emails. The advantage of the EasyEmail function is that it can use a secure email server (which almost all email servers are secure), while the MetaTrader SendMail function has trouble with secure email servers.
There is more info here:
Note:  The Easy Eamil plug-in is not standalone, it must be used with VTS-Connect.

 

How can I find my MetaTrader broker’s local time?

You may need to determine your MT broker’s local time to use the GMT offset feature of the Trade Time Manager.

Here is one way:

  1. Drag, drop and connect the MQL function TimeCurrent (Toolbox->Functions->Time).
  2. Click the (+) button to configure the TimeCurrent function, then select the message tab.
  3. On the message tab, check:
  • ‘send message’
  • ‘write value of time current’
  • ‘write on chart’
When you run this EA, the brokers time is shown on the chart.  You want to compare the broker’s time on your chart to the time of your PC to determine your offset.

What is the default behavior of the Trade Time Manager?

Any time intervals not specifically defined in the Trade Time Manager will have the default behavior of being able to open or close any and all trades.  In other words, it is like there is no trade time rule defined for that period.

For example, if you define a single rule, to close all trades from 3:00-4:59, then the periods from 0:00-2:59 and 5:00-23:59 will have the default behavior of opening and closing trades.

 

When I configure a System Manager does it apply to all of my Expert Advisors?
The settings for the managers apply to the current open system only.  You need to configure any manager settings for each VTS system you create.

We use the word “system” to describe the VTS  “system”: all of the drawings, functions and Manger settings seen when you open a VTS System, or create a new one. 
The output of a VTS System is an Expert Advisor (when you press Build).
Some ideas or “trading implementations” do not lend themselves easily to the drag, drop & connect concept. They are “system wide”, so we created Managers to implement these techniques.