거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
라이브러리

Easy to use Hedging Class for MQL4 by Peter Mueller - library for MetaTrader 4 - MetaTrader 4용 라이브러리

조회수:
1381
평가:
(3)
게시됨:
2024.06.21 22:30
업데이트됨:
2024.06.21 22:30
HedgingEA.mq4 (5.86 KB) 조회
\MQL4\Include\
HedgeClass.mqh (76.75 KB) 조회
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동


Input Parameters:

  • OrderDistancePoints : Determines the distance in points from the current ask price for placing buy orders and from the bid price for placing sell orders.
  • TPPoints : Specifies the take profit target in points.
  • Startlotsize : Sets the initial lot size for trades.
  • Gainperlot : Defines the desired gain per lot size.

The Code is full of comments, I'd recommend checking it out if you want to understand everything. 

The following functions are important: 

1 SetParameters:

  • void SetParameters(double TargetProfit, double Startlot, double GainPerLot, double BuyLevel, double SellLevel);
  • Sets various parameters for the trading strategy including target profit, starting lot size, gain per lot, buy level (price), and sell level (price).

2 TargetProfit:

  • void TargetProfit(double value);
  • double TargetProfit();
  • Setter and getter methods for the target profit parameter. Allows setting and retrieving the target profit value for the trading strategy.
3 GainPerLot:
  • void GainPerLot(double value);
  • Setter method for specifying the gain per lot. Sets the amount of profit desired for each traded lot.

4 SqueezeDistance:

  • void SqueezeDistance(double value);
  • Sets the distance used for squeezing in the trading strategy. Determines how far away from the current price levels pending orders are placed.

5 SetHardSL:

  • void SetHardSL(int points);
  • Sets the hard stop loss for trades, specified in points. Establishes a fixed level at which a position will automatically be closed to limit potential losses.

6 LongVolume:

  • double LongVolume();
  • Retrieves the total volume of long positions currently open in the trading strategy.

7 ShortVolume:

  • double ShortVolume();
  • Retrieves the total volume of short positions currently open in the trading strategy.

8 LongPendingVol:

  • double LongPendingVol();
  • Retrieves the total volume of pending long orders that have not been executed yet.

9 ShortPendingVol:

  • double ShortPendingVol();
  • Retrieves the total volume of pending short orders that have not been executed yet.

10 TradeCount:

  • uint TradeCount();
  • Retrieves the total number of active trades and orders currently managed by the trading strategy.

11 Run:

  • bool Run();
  • Initiates the execution of the trading strategy. Returns true if the strategy starts successfully.

12 onTick:

  • void onTick();
  • Function to be called within the OnTick() function of the Expert Advisor (EA). Handles logic and actions based on current market conditions and updates.

13 BuildFromTheInside:

  • void BuildFromTheInside(double Vol, double BuyPrice, double SellPrice);
  • Initiates the creation of new trading positions ( Vol ) within the specified buy and sell price levels ( BuyPrice , SellPrice ) to capitalize on market movements.

14 Stop:

  • void Stop();
  • Stops ( m_IsRunning ) the execution of the trading strategy. Ceases further trading actions until restarted.

15 Running:

  • bool Running();
  • Checks if the trading strategy is currently running ( m_IsRunning ). Returns true if the strategy is actively executing trades.

16 LastLongPrice:

  • double LastLongPrice();
  • Retrieves the price at which the last long position or order ( m_LastLongTicket ) was initiated. Returns 0 if no such information is available.

17 LastShortPrice:

  • double LastShortPrice();
  • Retrieves the price at which the last short position or order ( m_LastShortTicket ) was initiated. Returns 0 if no such information is available.

18 AddTicket:

  • bool AddTicket(ulong Ticket); 
  • Adds a trading ticket ( Ticket ) to the batch of orders managed by the trading strategy. Returns true if the ticket is successfully added.





Grid EA Pro Grid EA Pro

A professional Grid advisor works according to RSI ( Relative Strength Index ) indicators. And has the function of Reducing the Drawdown on the account by overlapping unprofitable orders. The chart displays information about the profit. It can be a very useful tool, For manual trading.

Harmonic AI Pattern Harmonic AI Pattern

HarmonicEA is an Expert Advisor (EA) developed for MetaTrader 4 (MT4) that utilizes harmonic pattern recognition and RSI-based signals to identify potential trading opportunities in the forex market. The EA is designed to detect various bullish and bearish harmonic patterns, including crab, butterfly, bat, deep bat, AB=CD, 3-drive, 5-drive, and shark patterns, across multiple timeframes. It incorporates risk management features such as dynamic lot sizing based on a percentage of account balance, maximum drawdown control, and a trailing stop mechanism to protect profits. HarmonicEA is suitable for traders seeking an automated solution to capitalize on harmonic patterns while managing risk effectively.

Linear Regression Value Linear Regression Value

Linear Regression Value (metatrader 4 version)

DPO - MA modified - MT4 DPO - MA modified - MT4

change of MA curve to horizontal line and DPO curve shall represent the distance from close price to zero level (or MA curve)