Skip to content

ForexRobotEasy/LastStand-NonGridHero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

LastStand NonGridHero

This is the code for the LastStand NonGridHero expert advisor, developed by the Forex Robot Easy Team. For detailed reviews and trading results of this product, please visit this link. Please note that ForexRobotEasy is not the official developer of this product. We are only providing a sample code that can work as described in this product. To find the official developer of this product, please search for it on MQL5.

Grid System Function

void OpenGridPositions(double lotSize, double gridDistance, bool openBothSides)

This function is used to open grid positions. It takes three parameters:

  • lotSize: The size of the lot for the positions.
  • gridDistance: The distance between each grid position.
  • openBothSides: A boolean value indicating whether to open positions on both sides (buy and sell).

The function first checks if openBothSides is true or false. If it is true or false, it opens a buy position using the OrderSend function with OP_BUY type and the current ask price. If openBothSides is true, it also opens a sell position using the OrderSend function with OP_SELL type and the current bid price.

Position Opening Preferences

void OpenPositionsOnPreference(double lotSize, bool openBuySide)

This function is used to open positions based on a preference. It takes two parameters:

  • lotSize: The size of the lot for the positions.
  • openBuySide: A boolean value indicating whether to open a buy position or a sell position.

The function checks if openBuySide is true or false. If it is true, it opens a buy position using the OrderSend function with OP_BUY type and the current ask price. If it is false, it opens a sell position using the OrderSend function with OP_SELL type and the current bid price.

Minimize Potential Damages

void MinimizeDamages()

This function is used to implement a damage minimization algorithm. The implementation of the algorithm is not provided in the code and should be added by the user.

Set Up Instructions

void SetUpInstructions()

This function is used to provide detailed instructions for setting up the LastStand NonGridHero expert advisor. The implementation of the instructions is not provided in the code and should be added by the user.

Main Program

void OnStart()

This is the main program of the expert advisor. It performs the following actions:

  1. Set up LastStand NonGridHero by calling the SetUpInstructions function.
  2. Open grid positions by calling the OpenGridPositions function with a lot size of 0.1, a grid distance of 10, and opening positions on both sides.
  3. Open positions based on preference by calling the OpenPositionsOnPreference function with a lot size of 0.1 and opening a buy position.
  4. Minimize potential damages by calling the MinimizeDamages function. The implementation of the damage minimization algorithm is not provided in the code and should be added by the user.

Please note that this code is a sample and may not work as intended without proper configuration and implementation of missing parts.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published