top of page

CoralTrade - Simple MT4 Trade Entry

speersd1

Updated: May 17, 2024

CoralTrade is a tool to help plan and execute trades. There are already a huge number of tools out there that do this, but none of them really offers the convenience and options I wanted, so I wrote my own.


CoralTrade main window

My other tools are all based on some strategy, but sometimes I just want to put in a trade. MT4 requires that you know your trade size, and only takes SL/TP as prices. Sometimes I want to specify SL/TP in terms of pips or ADR rather than having to figure out the prices. And then trade size, well that can be really complicated even if you know the formulas. And then I want to fine-tune all of this based on what I'm doing on the chart. And I need to do this all quickly. This is a challenge that is perfectly suited for a utility like CoralTrade.


Simple MT4 Trade Entry


You set the options for your trade, click the “Trade” buttons to display the configured trade with the current settings. CoralTrade will display lines on the chart for the SL and TP (and, for pending orders, the entry price); and you can either adjust the values in the dialog or drag the lines on the chart until you have the trade configured the way you want. When you’re satisfied click “Execute” to place the order. Easy peasy.


User Interface


Title Bar


Drag the little box on the left side of the title bar (the “reticule”) to move the dialog on the screen. Click the [x] on the right side of the title bar to minimize/restore the entire window, when you want to see more of the chart.


Trade Row


  • None - Click here to turn off the planning of a trade

  • Market - Click here to see lines for a market order. Initially it will be for a BUY order, and the button text will change to “BUY”. Click it again to toggle to a SELL order. The lines on the chart will adjust as well.

  • Pending - Click here to see lines for a pending order. Initially it will be for a BUY LIMIT order, and the text of the button will adjust. Click the button again to change to a SELL LIMIT order. I’ll discuss below in more detail about how to work with pending orders.


Size Row


You can configure trade sizes based on a fixed lots size, a risk % or an amount.


CoralTrade | Size Row
  • Fixed Lots - The value in the cell will be the lot size used for the trade, and no calculation will be done other than to verify the size complies with the specification for this instrument. If not it will be adjusted by rounding down to the nearest lot step, and a warning message will be printed to the log.

  • Risk % - The lot size will be calculated using an account size (configured in the inputs; see input options below). For instance, if you’re trading a $10,000 account and set the Risk % to 0.5, then you’re trading with 0.5% risk, or $50 per trade. When using Risk % or Amount as the trade size you must provide a SL, as this is used to calculate the trade size.

  • Amount - Rather than calculating an amount based on a Risk %, just use this amount directly. For instance, you could put 50.00 here to risk $50, rather than calculating it as a percent of an account balance.


Stop Loss Row


Required when using Risk% or Amount as the trade size. You can use various approaches for setting a stop loss for your trade.


CoralTrade | Stop Loss Row
  • Pips - The number of pips, e.g. 20.0 for a 20 pip trade. This will be converted to points for the current instrument as used for calculating the stop loss price.

  • Points - Instead you can provide the points directly, for instance 0.00200 would be 200 points or 20 pips for an instrument with 5 digits like EURUSD. If you’re using points you must know the number of digits and format the number correctly; it will not be adjusted before calculating the stop loss price.

  • ADR - The ADR period is configured in the inputs. Calculate current ADR (average daily range) and use this multiplier for the calculation. For instnace, if you put 0.5 here, that is 0.5 ADR, or half an ADR. We’ll calculate the ADR value for this instrument, multiply it by 0.5, and use that distance fo the SL calculation.

  • Bars - In this case the value in the edit box is an integer, referring to a number of bars back. For a BUY trade this will be the low of the specified bar; for a SELL trade it will be the high of the specified bar. The current bar is zero, and the numbers increase going back in time. To use the low of the previous bar as the SL for the trade, set Bars to 1.

  • Price - If you want to just set the price explicitly and not calculate it based on sizes, you can do that as well. No calculation or verification will be done to this number, so make sure it’s valid for your current chart.

  • None - Do not use a SL for the trade. Requires a fixed lot size.


Take Profit Row


Similarly you can use various approaches for setting the take profit for the trade:


CoralTrade | Take Profit Row

The options which are the same as for SL work the same way, so see above for those.


  • RR - Use a Risk-to-Reward ratio for calculating the TP price. In this case you must also have a SL defined. The SL distance will be used to calculate the TP price. For instance, if your SL is 20 pips and you set RR to 2.0, then the TP will be at 40 pips, a 1:2 RR, or a 2R trade. This works no matter how the SL price is calculated, whatever the price is will be used to figure the distance and set the TP price.


Magic / Comment Row


CoralTrade is an EA, even though it is not executing any trading strategy. As such, when you use CoralTrade to place a trade, that trade will get a magic number and trade comment based on your settings on this row, which you can set in the inputs and adjust here.


CoralTrade | Magic Row

Status Row


When you’re planning a trade the Status row will show you the results of your settings on the planned trade:


CoralTrade | Status Row

You’ll see the order type, symbol, lot size, open price, SL and TP prices.

This is helpful as a confirmation of what you’re about to open. You can also use this if you want to enter the trade yourself in the MT4 Order dialog, which you might want to do if you don’t want the trade to be identified as coming from an EA. Some prop firms do not allow the use of EAs, for example. This way you can use CoralTrade to configure a trade the way you want, and then you have the information needed to enter the trade in MT4.


(I mean, seriously. When I used to place trades manually in the Order dialog I would often get the dialog open and then realize it wants me to provide the price for SL and TP, rather than providing options for setting SL based on, say, pips or points. When trading Forex I’m usually thinking in pips; when trading indices I’m thinking in points, but I’m almost NEVER thinking in prices. So then I have to go figure out the prices and come back, and if I’m trying to trade quickly then this can be a frustrating hurdle.)

Execute Row

CoralTrade | Execute

When you’re happy with your trade, click “Execute” to place the order. There will be no confirmation, it will be placed immediately. If there is any problem, check the Experts tab to see why the trade wasn’t placed. The usual reasons are that EA trading is not enabled, a pending order too close to current price, or an invalid SL/TP value.


The “Clear” button will set the “Trade” row back to “None”, but it will NOT update the values in the window. If you’ve adjusted things like the SL distance then it keeps these values for you.


Chart Lines


When you click the Market or Pending button to plan a trade, CoralTrade will put lines on the chart to show you where the SL and TP are.


CoralTrade | Market Order Lines

Market Orders


Initially the lines are not selected. As price moves on the chart, the lines will follow price. If you say you want a 20 pip SL, then as price moves, the SL line will also move to always stay at 20 pips from current price.


However, you can select the line (double-click the line), and then it will stay fixed in place on the chart. The selected line will no longer move as price moves. Instead, the values that are being calculated for SL will be adjusted. As price moves, you’ll see the distance to the line and the risk of the trade adjusted on the line text; and the values in the CoralTrade window will update as well.


Furthermore, you can now drag this line to where you want it, and the values will be updated.


If the TP line is based on RR and is not selected, then as the SL distance changes (either because price is moving or you moved the line) then the TP line moves in real time as well, to always stay at this RR from current price. You can select the TP line and drag it; and as price moves, the RR value in the ChartTrade window changes accordingly


Pending Orders


When you’re configuring a pending order, you also have an Entry Price line on the chart. This line is selected by default so it can immediately be dragged without double-clicking.


CoralTrade | Pending Orders

Now when the SL and TP lines are not selected, if you drag the Entry line, the SL and TP lines will follow. If the SL or TP line is selected, then the values for SL and/or TP are adjusted accordingly, re-calculated as the entry price changes.


Initially you’ll see a BUY STOP order (entry price 5 pips above Ask). If you want a BUY LIMIT order instead, simply drag the entry line below current price and it will be updated automatically.


To change to a pending SELL order, click the Pending button again. Drag the entry line to the other side of current price to change the type of pending order. When you toggle between BUY and SHORT pending orders, the entry line will stay in place and the SL/TP lines will adjus, keeping their current distances.


NOTE: The SL and TP lines are showing you both the distance to that line in whatever unit you’ve selected; and the value if price were to reach that line, as a percent of account balance. For instance if you set 0.5% risk of account balance, then when looking at a trade you’ll see that the SL line says -0.50%. The Entry line for pending orders will show the risk associated with your current settings, not account balance.


If you’re using a different account source for the size used to calculate lot sizes, then it may be confusing, because you may see a different value than what is displayed in the CoralTrade window. The CoralTrade window is showing your current settings used to calculate lot sizes, for instance you could risk 10% of a $20.00 account per trade, even when your account balance is actually $10,000. The Entry line will show 10% risk, because that's based on your settings. But the values shown on the SL and TP lines are always based on your current account balance, regardless of what you’ve selected; so in this case it’s based on $10,000.00, not based on $20.00. If you see a value for the trade on the SL/TP line and it doesn’t match the Entry line or what you see in the CoralTrade window, this is very likely the reason.


Input Options


CoralTrade | Input Options
  • Risk Source - Choose between Account Balance, Account Equity, or Fixed Amount. When using Fixed Amount, set the amount to use in the next row.

  • Fixed Amount - Ignore your actual account size and calculate lot sizes based on this amount instead. For instance, if you’re trading a $10,000 account and want lot sizes to be based on this amount regardless of changes to your account balance, you can set 10000.00 here. This would only be meaningful when using a Risk% for calculating lot sizes.

  • Default XXX - These default values are for the options in the CoralTrade window. There are two benefits to setting values here. One, you can save a preset for different types of instruments and have the dialog pre-configured correctly when you load it on a chart and apply the settings. And second, for the Size, SL and TP rows, if you click the “Reset” button it will set the values back to the options set in the inputs for that row.

The remaining options "Table Settings" are to customize the look & feel of the UI. You can also use the Skin files supported by all Coral Tools.


CoralTrade will be available shortly from the MQL5 Market.

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • MultiMAX Telegram Group
  • YouTube

Trading CFDs and FX is high risk and not suitable for all investors. Losses can exceed your initial investment. Any Information or advice contained on this website is general in nature and has been prepared without taking into account your objectives, financial situation, or needs. You should never trade any capital that you cannot afford to lose.  The author of this website is not responsible for any losses you incur, even if you're using tools obtained from this author, or trading based on information provided from this website, related websites and accounts (e.g. YouTube) or from the author directly.

The information on this website is not intended to be an inducement, offer, or solicitation to any person in any country or jurisdiction where such distribution or use would be contrary to local law or regulation.

 

Copyright © 2024 by ChartLogic EA.

bottom of page