EA Primary Setup -Inputs
Technique Management Inputs
These inputs decide how the EA behaves with respect to opening additional trades and the sensitivity of indicators.
-
enter bool enableAdditionalTrades = true;
Goal: Allows (or disables) the power to open additional trades if the buying and selling bias (operating whole) will increase considerably.
When enabled: The EA can add to an current place if the sign grows stronger. -
enter double additionalTradeGap = 300.0;
Goal: Defines the minimal value hole (in pips, transformed to factors internally) that should be met between consecutive further trades.
Utilization: Helps keep away from speedy re-entry or “whipsaw” when the worth hasn’t moved sufficient from the earlier further entry. -
enter double additionalTradeThreshold = 3;
Goal: Units the minimal improve within the operating whole (i.e., the cumulative bias from current bars) required to set off a further commerce.
Utilization: Ensures that an additional commerce is simply taken when the sign’s energy will increase by at the least this quantity in comparison with the earlier commerce sign.
Working Whole Configuration
These parameters management how the EA calculates the bias (or sign energy) by summing the contributions from a number of bars.
-
enter int runningTotalBars = 13;
Goal: Defines the variety of earlier bars used to compute the operating whole of bias values.
Utilization: A bigger quantity smooths out random fluctuations; a smaller quantity makes the EA extra delicate to current strikes. -
enter double minCountThreshold = 7;
Goal: Units the minimal sum of bias (from the current bars) required to set off a brand new commerce.
Utilization: Helps filter out weak or indecisive market circumstances. -
enter double maxCountThreshold = 0;
Goal: Establishes an higher restrict for the bias—if the operating whole exceeds this threshold, the EA would skip the commerce.
Utilization: When set to 0, it’s successfully turned off; if a nonzero worth is supplied, it prevents buying and selling in overly robust circumstances the place the bias is perhaps excessively excessive.
Commerce and Threat Administration Inputs
These settings decide your commerce measurement and danger thresholds.
-
enter double fixedLotSize = 0.1;
Goal: Defines the fastened variety of tons to commerce for every order.
Utilization: That is the bottom quantity that will likely be normalized later to adjust to the dealer’s quantity settings. -
enter int stopLossPoints = 850;
Goal: Specifies the cease loss distance in factors (a “level” being the minimal value motion outlined by the dealer’s image settings).
Utilization: Determines how removed from the entry value the cease loss is positioned to restrict potential losses. -
enter bool useTrailingStop = true;
Goal: Allows (or disables) a trailing cease mechanism.
Utilization: When enabled, the EA will alter the cease loss in the course of the lifetime of the commerce, probably locking in income because the market strikes favorably. -
enter double takeProfitPercent = 6;
Goal: Units the take revenue threshold as a share achieve relative to the account stability.
Utilization: When fairness reaches this share above the stability, the EA will shut all trades to safe income. -
enter double maxDrawdownPercent = 1;
Goal: Defines the utmost allowable drawdown (as a share beneath the account stability) earlier than all trades are closed.
Utilization: Acts as a security mechanism to restrict losses in antagonistic market circumstances. -
enter int MagicNumber = 123452;
Goal: Supplies a singular identifier for all trades executed by this EA.
Utilization: Distinguishes these orders from these positioned manually or by different EAs operating on the identical account.
Single Candle Patterns – Bias and Detection Thresholds
These inputs set bias values for indicators generated by sure single-candle patterns and decide detection standards.
-
enter double biasPinBar = 0.5;
Goal: Assigns a bias rating for detecting a Pin Bar sample (a reversal candle with an extended tail).
Utilization: A Pin Bar contributes positively or negatively to the buying and selling sign relying on its context. -
enter double biasInvertedHammerBull = 3;
Goal: Units the bias for an Inverted Hammer sample in a bullish state of affairs, the place an extended higher wick might sign a reversal. -
enter double biasWideRangeBull = -3.5;
Goal: Assigns a bias to wide-range bullish candles (a big candle physique in comparison with the general vary), which might point out robust momentum. -
enter double biasMarubozuBull = -1;
Goal: Determines the bias for a Marubozu candle—a candle with little or no wicks that signifies robust directional conviction. -
enter double minPinBodyRatio = 0.11;
Goal: The minimal ratio of the candle physique to the total vary required for a candle to qualify as a Pin Bar or hammer sample. -
enter double dojiBodyThresholdRatio = 0.1;
Goal: Establishes the utmost body-to-range ratio for a candle to be thought-about a Doji.
Utilization: Ensures that solely candles with little or no physique (indicative of market indecision) are flagged.
Two Candle Patterns – Bias Settings
These inputs are used for patterns involving two consecutive candles.
-
enter double biasBullEngulfing = -1.5;
Goal: Units the bias for a bullish engulfing sample the place a bullish candle utterly engulfs a earlier bearish candle. -
enter double biasInsideBarBull = 1;
Goal: Supplies a constructive bias for an inside bar sample, the place the present candle’s vary is fully throughout the earlier candle’s vary. -
enter double biasHaramiBull = 0;
Goal: Defines the bias for a bullish Harami sample—a small bullish candle contained inside a bigger bearish candle.
Utilization: A zero worth means it has a impartial influence on the sign. -
enter double biasPiercing = 3.5;
Goal: Assigns a bias for a Piercing sample. This can be a bullish reversal sample the place a bullish candle closes above the midpoint of a previous bearish candle.
Three Candle Patterns – Bias and Detection Thresholds
These inputs apply to indicators derived from three-candle formations.
-
enter double biasMorningStar = 2;
Goal: Bias for a Morning Star sample (a three-candle bullish reversal that usually features a doji), indicating a shift in momentum. -
enter double biasThreeWhiteSoldiers = 4.5;
Goal: A robust bullish bias when three consecutive bullish candles (Three White Troopers) are detected. -
enter double biasThreeInsideUp = 5;
Goal: Bias for a “Three Inside Up” sample, the place an inside sample confirms bullish reversal. -
enter double biasThreeBarBullRev = 3;
Goal: Units a bias for a custom-defined three-bar bullish reversal sample. -
enter double biasUpsideGapTwoCrows = 3;
Goal: Though named with a “crows” reference, it’s related to bearish hole patterns involving two candles.
Utilization: The setting means that such a formation contributes a particular bias to the general sign.
Hole Patterns – Open-Shut Based mostly Bias Settings
These inputs tackle hole patterns by evaluating open/shut costs, providing further indicators.
-
enter double biasGap_OC_Up_BullBull = -1;
Goal: Bias worth for a niche up state of affairs the place bullish circumstances proceed (each earlier and present candles are bullish). -
enter double biasGap_OC_Up_BullBear = -2;
Goal: Bias for a niche up sample that reverses into bearish habits. -
enter double biasGap_OC_Down_BullBull = 2;
Goal: Bias for a niche down that continues bullish momentum, an uncommon state of affairs the place market construction may suggest a retracement. -
enter double biasGap_OC_Down_BullBear = -3;
Goal: Bias for a niche down resulting in bearish continuation.
Hole Patterns – Excessive-Low Based mostly Bias Settings
These settings contemplate gaps within the high-low vary moderately than open-close ranges.
-
enter double biasGap_HL_Up_BullBull = -2.5;
Goal: Bias for a bullish affirmation in a niche up state of affairs primarily based on the high-low vary. -
enter double biasGap_HL_Up_BullBear = -5;
Goal: A stronger bearish bias in a niche up state of affairs when circumstances reverse. -
enter double biasGap_HL_Down_BullBull = -1.5;
Goal: Bias for hole down with bullish continuation. -
enter double biasGap_HL_Down_BullBear = 0.5;
Goal: A light bias for hole down eventualities that flip bearish.
Sample Group Allow/Disable Flags
These boolean switches allow you to select which units of sample analyses to run. Disabling a gaggle can simplify the decision-making course of if you happen to want to give attention to explicit patterns.
-
enter bool analyzeSingleCandlePatterns = true;
Allows or disables the detection of single-candle patterns. -
enter bool analyzeTwoCandlePatterns = true;
Controls whether or not two-candle sample detection is energetic. -
enter bool analyzeThreeCandlePatterns = true;
Toggles the evaluation for three-candle patterns. -
enter bool analyzeGapPatterns = true;
Determines if gap-based patterns are to be included within the buying and selling sign.
MA Cross Visualization Settings (Transferring Common Filter)
These inputs configure two transferring averages used as a filter to additional verify commerce indicators.
Quick Transferring Common (MA1)
-
enter bool InpUseMAFilter = true;
Goal: Allows or disables the transferring common filter fully.
Utilization: When enabled, the EA will solely take a commerce if the quick MA is within the desired relation to the sluggish MA. -
enter string FAST and associated textual content strings ( MA1_TEXT , MA1_TEXT_2 ):
Goal: Present labels or visible separators for the quick MA settings when displayed on the chart. -
enter ENUM_TIMEFRAMES MA1_TIMEFRAME = PERIOD_CURRENT;
Goal: Units the timeframe on which the quick MA is calculated (by default, the present chart’s timeframe). -
enter ENUM_MA_METHOD MA1_MODE = MODE_SMA;
Goal: Defines the strategy used for the quick MA calculation (Easy Transferring Common on this case). -
enter int MA1_PERIOD = 60;
Goal: Specifies the interval (variety of bars) to calculate the quick MA. -
enter int MA1_SHIFT = 0;
Goal: Permits shifting the quick MA ahead or backward relative to the worth bars. -
enter ENUM_APPLIED_PRICE MA1_APPLIED_PRICE = PRICE_CLOSE;
Goal: Chooses the worth information (e.g., shut, open, excessive, low) that’s fed into the quick MA calculation.
Sluggish Transferring Common (MA2)
-
enter string SLOW, MA2_TEXT, MA2_TEXT_2 :
Goal: Just like the quick MA strings, these are used for labeling and visible group for the sluggish MA settings. -
enter ENUM_TIMEFRAMES MA2_TIMEFRAME = PERIOD_CURRENT;
Goal: Units the timeframe for the sluggish MA calculation. -
enter ENUM_MA_METHOD MA2_MODE = MODE_SMA;
Goal: Determines the strategy for the sluggish MA (once more utilizing a easy transferring common). -
enter int MA2_PERIOD = 155;
Goal: Units the variety of bars utilized in calculating the sluggish MA. Usually, an extended interval is chosen than for the quick MA. -
enter int MA2_SHIFT = 0;
Goal: Permits for adjusting the alignment of the sluggish MA. -
enter ENUM_APPLIED_PRICE MA2_APPLIED_PRICE = PRICE_CLOSE;
Goal: Selects which value to make use of (right here, the closing value) for calculating the sluggish MA.
Abstract
Every setting has been fastidiously designed to regulate both the:
-
Commerce Execution and Administration: (lot measurement, cease loss, trailing stops, danger limits, additional commerce circumstances)
-
Sign Technology: (candlestick sample biases and thresholds, operating whole calculation)
-
Market Filtering: (transferring common filter for commerce affirmation)
By adjusting these inputs, you possibly can fine-tune the technique’s sensitivity, danger profile, and market situation adaptability.
This thorough clarification ought to assist you to—and any finish consumer—perceive the aim and performance of each configuration parameter within the EA.