Grid Main Settings


The Grid Main Settings tab is used to set global settings for the trading grid.  The following table describes each setting.



Parameter Name

Data type

Description

Grid Price (Grid Start Price)

double

This is the price used for determining price action throughout the grid. For example, if the Grid Price is set to Bid, trades will be opened based on the value of the Bid price with respect to the Grid levels.  Any price value can be used. Most trading grids use Ask, Bid or (Ask+Bid)/2.  These values are all available from the pull-down menu as well as the Choose button.


This value also defines the Grid Start Price. The start price is set the moment the Grid is first build and is used as an anchor price for the life of the grid.

Profit Target

double

This is the profit value in dollars (or local currency) that when reached will cause the grid to be closed for a profit.  The profit is calculated using only the trades opened by the grid, not all trades open on the account.

Maximum Allowable Loss

double

This is the loss value in dollars (or local currency) that when reached will cause the grid to be closed for a loss.  The loss is calculated using only the trades opened by the grid, not all trades open on the account.

Base Magic Number

integer

A Magic Number is used to identify an open trade. The Base Magic Number is used to define magic numbers for each level of the grid. For example, if the Base Magic Number is 1000:

  • A trade opened in Up Level 1 will have a magic number of 1001.
  • A trade opened in Up Level 2 will have a magic number of 1002.
  • Etc.
  • A trade opened in Down Level 1 will have a magic number of 999.
  • A trade opened in Down Level 2 will have a magic number of 999.
  • Etc.

NOTE: The trader must take care to not allow the magic numbers to collide with other running Expert Advisors that use magic numbers.

Maximum Open Trades

integer

The maximum number of trades that the grid will open.  Any attempt by the Grid to open a trade after this number has been reached will be denied.

Maximum Open Lots

double

The maximum total number of lots that the grid will open.  Any attempt by the Grid to open additional lots  after this number has been reached will be denied.

Grid Rebuild Rule

integer

This rule defines when the Grid will be rebuilt. The allowable values are:

  • Never: The Grid is never rebuilt.
  • OnGridClose: The Grid is rebuilt when the Grid has been close for a profit or loss.  This is the behavior of most grids.
  • OnDay: The Grid is rebuilt at the start of each day.
  • OnHour: The Grid is rebuilt at the start of each hour.
  • OnNewBar: The Grid is rebuilt at the start of each new bar.
  • OnTick: The Grid is rebuilt on each new tick. Note: This setting only makes sense in very specific configurations, for example when the grid levels are defined as prices (such as a Moving Average) that may change with each tick.


Maximum Runs

integer

Defines how many times the Grid may run.  A run is complete when the Grid has closed for either a Profit or a Loss.

Note: A value of 0 allows unlimited runs.

Run Again Rule

integer

Defines when the Grid may run again. The allowable values are:

  • Always: Always runs again, until Maximum Runs is reached.
  • OnceOnly: Runs one time only.
  • OnLoss: Runs again only after a loss.
  • OnWin: Runs again only after a win.





Related Topics:
What is VTS
Why use VTS
Installing VTS
Everything You Need To Know About VTS
Expert Advisor Facts
Configure
Configure
Custom Indicators
MQL Function
TEXT Element
INPUT Manager
TRADETIME Manager
TRADESIGNAL Manager
COMMUNICATION Manager
OPENTRADE Manager
Message
Logic
MetaTrader Platform Configuration
Compiler
Compiler Flags
Special Functions
fnOpenOrder
init and deinit
MetaTrader Platform
ECN Brokers
Step 2
Function and Logic Power Plug-in
Logic
Candlestick Plug-in
Using a Candlestick Function in a Logic Element
Easy Email Plug-in
Configure Easy Email Settings
Using Easy Email from the Communication Manager
Using Easy Email from any Element
Using Easy Email with the fnSendEzEmail Function
Testing the Easy Email Connection
TrendLine Plug-in
Building an Expert Advisor to manage a manually drawn trend line
Building an Expert Advisor to draw and manage a trend line
Grid Plug-in
FX PowerGrid Functions
fnRemoveLines
Using FX PowerGrid
Script & Multi-Platform Plug-in
Building a MetaTrader Script
Using the Multi-Platform Feature
Profit Exits Plug-in
Profit Manager Plug-in
Target
Action
Price Chart
Client-Side Stops Plug-in
Emergency Stops
Using Client-Side Stops
Fibonacci Trader Plug-in
Building an Expert Advisor to manage a manually drawn Fibonacci retracement
Building an Expert Advisor to draw and manage a Fibonacci retracement
Signal Aggregator Plug-in
Signal Type: MQL
MQL-Mentor Plug-in
Partial-Close Plug-in
Partial-Close Price Chart
EA-Indicator Plug-in
Using the EA-Indicator Plug-in
Custom Indicators in the Toolbox
EA-Indicator Video
Chart Objects Plug-in
Market Score Plug-in
Order History Plug-in
EA Secure Plug-in
EA Secure Configuration
Chart Execute Plug-in
Money Manager Plug-in
Money Manager Configuration
Money Management Table
Package Plug-in
Pivot Points Plug-in
Using the Pivot Point Plug-in
File IO Plug-in
Multi Trade Plug-in
Debug Manager Plug-in
Event Manager Plug-in
MQL Event Documentation