Experts: CCI + MACD Scalper

 

CCI + MACD Scalper:

Indicators used: - EMA (default period 34) - CCI (default MA period 50) - MACD (default MT5 settings) The strategy goes as follows: For BUY orders: - The candle must close ABOVE the EMA - The CCI indicator must cross the 0 level and go into the positive - The MACD indicator must be below 0 and make a cross while below the 0 level For SELL orders: - The candle must close above the EMA - The CCI indicator must cross the 0 level and go into the positive - The MACD indicator must be below 0 and make a cross while below the 0 level

Author: Dorde Milovancevic

 

Hi Dorde,

  I attached this EA to my chart, but it's not taking trades automatically.

 
unugbe05 #:

Hi Dorde,

  I attached this EA to my chart, but it's not taking trades automatically.

It doesn't take trades very often, so don't expect it to open trades the moment you put it on the chart. Give it some time and I'm sure it will open some trades.

 
its using large lot sizes, how do i add a fixed lot size?
 
Dorde Milovancevic #:

It doesn't take trades very often, so don't expect it to open trades the moment you put it on the chart. Give it some time and I'm sure it will open some trades.

I tried it with captial 50000, that works.
Thanks to the autor for this stratgey, but this strategy does not offer a fixed lot size.
In this case we have no clue, with what lotsize this strat works (so running this live, could crash the account instantly). Also it should be possible to start trade with 100$.
I'm not experience enough to fix this.

 
IcHiAT #:

I tried it with captial 50000, that works.
Thanks to the autor for this stratgey, but this strategy does not offer a fixed lot size.
In this case we have no clue, with what lotsize this strat works (so running this live, could crash the account instantly). Also it should be possible to start trade with 100$.
I'm not experience enough to fix this.

There is an input parameter called "Account risk % per trade" in the EA. In there you put in what percentage of your account you want to risk if you have a losing trade. In this version of the EA, there isn't a option to use a fixed lot size.
The reason you can't start with $100 is probably because it would make the lot size too small. There are no pairs in which you could risk 2% (default account risk % per trade) of a $100 per trade.
If you're interested in me making you a custom EA, please PM me and I'll make an EA to your liking.

 
Let's break down the key components and functionalities: 1. Header Information: The script starts with some header information, including the EA name, copyright details, version number, and links. 2. Input Parameters: Input parameters are defined to control various aspects of the EA. These parameters include EA settings, money management settings, trading settings, and trading time settings. Traders can adjust these parameters to customize the behavior of the EA. 3. Import Statements: The script imports several classes from the Trade directory, which are part of the MQL5 standard library. These classes provide functionality for dealing with trading operations, positions, orders, account information, and symbol information. 4. Predefined Variables: Some variables are defined for code readability. For example, Ask and Bid are defined as the current ask and bid prices. 5. Objects Initialization: Several objects are created and initialized, such as CPositionInfo, CTrade, CSymbolInfo, CAccountInfo, and COrderInfo. These objects are used for interacting with trading-related information and operations. 6. Initialization Function (OnInit): The OnInit function is called when the EA is initialized. It sets up various parameters, such as the magic number, margin mode, type of filling by symbol, and deviation in points. 7. Deinitialization Function (OnDeinit): The OnDeinit function is called when the EA is being removed from the chart. It can be used for cleanup operations. 8. Tick Function (OnTick): The OnTick function is called on every tick. It checks if trading is allowed, calculates the current spread, and prints information about the EA's status. It also calls functions to update orders, apply trailing stop, and open new orders based on specified conditions. 9. OpenOrder Function: The OpenOrder function calculates the lot size and opens a new order (buy or sell stop) based on specified conditions. 10. TrailingStop Function: The TrailingStop function is responsible for implementing trailing stop functionality for existing open positions. 11. UpdateOrders Function: The UpdateOrders function checks if there are any open positions or pending orders associated with the EA. 12. CalculateVolume Function: The CalculateVolume function calculates the position size based on the chosen money management settings. 13. Check Functions: Several functions (e.g., CheckSpreadAllow, CheckMoneyForTrade, CheckOrderForFREEZE_LEVEL, CheckStopLoss, etc.) are defined to check various conditions before opening or modifying orders. These functions ensure that the EA adheres to specified rules and market conditions. 14. RefreshRates Function: The RefreshRates function updates symbol quotes data. Overall, this EA is designed to perform trading operations based on the specified input parameters, and it incorporates features such as money management, trailing stop, and trading time filtering. Traders can further customize the EA by adjusting the input parameters according to their trading preferences.
Reason: