Hello fellow Traders.
In a recent programming attempt I wanted to try out manual Take Profits and Stop Losses.I'd like you to tell me if I'm grasping this concept right or is there a change that is due. Note: In Take Profit I include the Spread which I have to in order to compensate for the Broker, but with Stop Loss I don't. Is this ok? Also I am using the Ask price since I've read it's the price the Broker offers and considers when entering Buy Positions.
bool BuyTradeOpen; //A pretend check to see if a Trade is open
double AskPN; //Ask Price New
double OrderPrice; //Price at which we have opened the Trade
double TakeProfit = 0.00500; //50 Pip Take Profit (EUR/USD)
double StopLoss = 0.00250; //25 Pip Stop Loss (EUR/USD)
double SpreadC; //A pretend Spread Value
if (BuyTradeOpen == True)
AskPN = Ask;
if (AskPN >= (OrderPrice + TakeProfit + SpreadC)) //Take Profit
//Close Trade with 50 Pips of Profit
else if (AskPN <= (OrderPrice - StopLoss)) //Stop Loss
//Close Trade with 25 Pips of Loss
Percent Crosshair is a powerful and easy percentage measure tool.
Measure the chart percentage very quick! Don't waste your time anymore!
Just attach the Percent Crosshair indicator in the chart, select crosshair mode at toolbars or press "Ctrl+F" and start using the crosshair as you always do! The percent measure will be next to the indicative price.
Customize your indicator the way you want!
There are 4 entry parameters:
Positive % color: set the desired color when % is positive. Negat
The script allows users to easily close positions if their profit/loss reaches or exceeds a value specified in pips.
Please set slippage value first. Sometimes some positions do not close due to high volatility of the market. Please set larger slippage or restart the script.
What is Squeeze?
A contraction of the Bollinger Bands inside the Keltner Channel reflects a market taking a break and consolidating, and is usually seen as a potential leading indicator of subsequent directional movement or large oscillation movement.
When Bollinger bands leave Keltner Channel it means markets switching from a low volatility to high volatility and high volatility are something all traders are looking for.
What I was missing in some indicators is possibility of monitoring many
This is a professional trading robot, which implements the classical strategy of trading inside a channel based on the PriceChannel indicator. The signal is formed at a breakthrough of the lower and upper borders of the Price Channel inside the channel. If the price breaks the lower border of the Price Channel and the price is fixed above this border, it is a buy signal. If the price breaks the upper border of the Price Channel and the price is fixed below this border, then it's a sell signal. O
The script is intended for automatic placing of Sell Stop pending orders, Stop Losses and Take Profits on the user specified levels. This script is not that useful as "Virtual pending buy stop", since short positions are opened as Bid price crosses the levels. Thus spread widening is not dangerous. Nevertheless, you need to have this script to prevent unwanted hitting of the Stop Loss levels.
Automation of the process of placing the Sell Stop pending orders, Stop Losses and T
Currency Power Meter shows the power of major currencies against each other. The indicator shows the relative strength of currency/pair at the current moment in a period of time (H4, daily, weekly, monthly). It is useful for day traders, swing traders and position traders with suitable period options.
Currency power is the true reason of market trend: The strongest currency against the weakest currency will combine into a most trending pair. As we know, trend makes money and all traders love t
This indicator is an adaptation of the MQL4 TDI writen by Dean Malone.
It uses RSI oscillator to assist traders to identify market conditions and reversals. Many strategies have been developed involving TDI or similar indicators which proves it's reliability and potential profitability.
Blue shadow and yellow market line can be removed from chart in the indicator options panel. A file with instructions is available upon request.
The Expert Advisor modifies the Stop Loss level of the opened position (on the current instrument).
The Parabolic SAR, NRTR (Nick Rypock Trailing Reverse), Moving Average indicators or the linear channel regression are used.
Trailing stop only when profit;Trailing stop only to price;work on each tick or on completed (formed) bars.
This indicator allows you to enjoy the two most popular products for analyzing request volumes and market deals at a favorable price:
Actual Depth of Market Chart Actual Tick Footprint Volume ChartThis product combines the power of both indicators and is provided as a single file.
The functionality of Actual COMBO Depth of Market AND Tick Volume Chart is fully identical to the original indicators. You will enjoy the power of these two products combined into the single super-indicator!
News Trader Pro is a unique robot that allows you to trade the news by your predefined strategy. It loads every piece of news from several popular Forex websites. You can choose any news and preset the strategy to trade it, and then News Trader Pro will trade that news by selected strategy automatically when the news comes.
News release gives opportunity to have pips since the price usually has big move at that time. Now, with this tool, trading news becomes easier, more flexible and more excit
The main purpose of the indicator is to detect and mark trade signals on the histogram of the Awesome Oscillator according to the strategies "Trading Chaos, second edition" and "New Trading Dimensions".
The indicator detects and marks the following trade signals:
"Two peaks" - Divergence. The signal "Second wise-man" - third consequent bar of the Awesome Oscillator after its color is changed. The histogram crosses the zero line. The signal "Saucer".The indicator includes a signal block th
The script creates account summary report in a separate window.
The report can be created for all deals and on deals for selected financial instruments.
It is possible to specify a time interval of calculation and save report to htm-file.
Does not support hedging orders on a single symbol on MT5
MultiMTCopier MT5Receiver - new and improved multi-terminal positions copier for your real/demo account, works faster, requires less, flexible in managing and upgrading, new information support. This Expert Advisor is designed for the MetaTrader 5 terminal, trades will be copied into this terminal.
The EA will copy all positions without delays Additionally integrated notification in situations requiring user attention
VirtualTradePad - is a contol panel for working with orders in МetaТrader 5 : buy, sell, buystop, buylimit, sellstop, selllimit, close, delete, modify, tralling stop.
VirtualTradePad won 2nd prize in the "Best Control Panel in the MQL5 Language" Contest.
The panel consists of 5 tabs.
VirtualTradePad PositionsStyle VirtualTradePad Ordersstyle VirtualTradePad SignalsStyleDemo version of the panel - VirtualTradePad LiteProfit or Loss PadINFO PadYou can also try this panel for
We present you an effective software solution for arbitrage between brokers.
The Arbitrage on the market became widespread due to decentralization. There are many liquidity providers, whose quotes differ for various reasons. By tracking the dynamics of changes in the quotes of different brokers, it is possible to determine the delayed and leading brokers, thereby predicting the future prices of the delayed broker for a short time. Knowing these prices and using efficient built-in software filte
Scalper with Automatic Parameter Setting
Would you like to have an Expert Advisor that could automatically calculate trade parameters and adjust to the current market situation?
We present you our new development for the Forex market. This is a tick scalper for МТ4 and МТ5 - TickSniper.
Trading with it is fully automated. Forget continuous monitoring - this Expert Advisor trades independently. Its settings have been optimized over the course of testing on our real accounts.
You no longer need dozens of monitors to analyze the behavior of 28 different instruments on 6 timeframes in statics and dynamics of their relationship.
Megatrend Monitor SF286 allows you to do all that on a single monitor in a window of a single chart.
Model SF286 only resembles its predecessor - Megatrend Monitor.
SF286 received a completely new algorithm based on the SinFractal 7TF indicator, and became much faster in calculations and histogram plotting.
And most importantly, SF286 acqui
The Expert Advisor implements the classic "triangular arbitrage", which is successfully used by hedge funds.
"Triangular" arbitrage refers to a class of neutral-market strategies, in which the profit or loss of open positions does not depend on the direction of the market movement as a whole.
In order to take profit, the EA exploits a weak spot of market makers - it utilizes the difficulty of balancing cross rates of all currency pairs.
The advantages of the strategy are the following:
PipTick VSA is based on the original Volume Spread Analysis method. It was designed for quick and easy recognition of VSA patterns. Even though this indicator looks very simple, it is the most sophisticated tool that we've ever made. PipTick VSA indicator is a really powerful analytical tool that generates very reliable trading signals. Because it is very user friendly and understandable, it is suitable for every type of trader, regardless of his experience.
What is VSA?
VSA - Volume Spread An
Trade in the opposite directions with HedgeTerminalApi library!
HedgeTerminalApi is a program interface allowing you to use HedgeTerminal virtualization technologies in your robots and scripts. With HedgeTerminalApi, you are able to trade in the opposite directions when two or more trading algorithms occupy opposite positions on a single symbol. The library allows robots to track their positions even if these positions overlap entirely or partially. Moreover, with this library, you are able to
The Triangular Arbitrage EA exploits inefficiencies between three related currency pairs, placing offsetting transactions which cancel each other for a net profit.
Easy to set up and supervise No indicators or hard analysis needed The strategy is time-frame independent Under ideal trading conditions, triangular arbitrage is a zero-risk strategy Arbitrage is a high-volume strategy and generates a lot of rebatesIt implements a set of unique features:
You decide which pair set
The script is intended for automatic placing of Buy Stop pending orders, Stop Losses and Take Profits on the user specified levels.
Avoiding unwanted entering a long position in case of false hitting the level as a result of widening of the spread by a dealing center. Avoiding unwanted triggering of a Stop Loss in case a quote pierces a significant level (fractal) without further confirmation with the close price. Setting a necessary virtual order and entering the market in
The Digitized Candle Length indicator calculates and shows the length of bars (pips) between High and Low, and also between Close and Open.
The upper digit is High/ Low, the lower one is Close/Open.
Supply Demand with Mean Reversion Concept
The concept of supply demand trading rely on the quantity mismatching between buying and selling volumes in financial markets. To typical traders, supply demand zone serves as the turning point. When we looked at its original concept, we have found that the original supply demand trading can be performed better at mean reversion period rather than trend period. For the demonstration of this concept, for any supply demand zone to work as an successful tr
Safe Automatic is a safe MetaТrader 5 trading robot working autonomously on a VPS server. The good results are achieved on EURUSD.
The EA applies modified versions of a trend-following strategy, half-pyramiding, scalping, Elliott Wave method and speculating trading with a deposit protection. The EA switches the strategies automatically. The program also takes the news calendar into account: the robot does not enter the market in a 10-minute interval before and after a news rel
This is an intelligent trend indicator based on Moving Averages and Bollinger Bands. The indicator does not redraw at all. In order to trade, all you have to do is watch for color changes. Go short when a thick red line is drawn over price action, and go long when the blue thick line appears under price action.
The indicator will show the trend, so therefore it is advisable that you must use an oscillator to provide for well-timed entries. Otherwise, the stop loss will probably be reached. Usin
Pipfinite creates unique, high quality and affordable trading tools.
Our tools may or may not work for you, so we strongly suggest to try the Demo Version for MT4 first. Please test the indicator prior to purchasing to determine if it works for you.
We want your good reviews, so hurry up and test it for free...we hope you will find it useful.
Channel Flow with Strength Meter
Strategy: Increase probability by confirming signals with strength Watch Video: (Click Here)
Ichimoku Kinko Hyo is a purpose-built trend trading charting system that has been successfully used in nearly every tradable market. It is unique in many ways, but its primary strength is its use of multiple data points to give the trader a deeper, more comprehensive view into price action. This deeper view, and the fact that Ichimoku is a very visual system, enables the trader to quickly discern and filter "at a glance" the low-probability trading setups from those of higher probability.
qAutoActivation indicator is one of the main components of Trading Chaos Expert trading expert panel. The indicator displays the current trend on the current timeframe. This is the first indicator that is attached to the chart and saved in the trading complex template. It defines what trading signals from the expert panel should be automated for market entry (bullish or bearish ones).
When the trend changes, the indicator changes the line color and, at the same time, highlights the trading pane
The MultiTimeFramesAnalis indicator analyzes 19 time frames from M1 to D1. If there is a bullish candlestick, the rectangle is green, if there is a bearish candlestick, the rectangle is red, if there is a Dodji - the color is yellow. Furthermore, it calculates indicator values based on the current trend strength. This indicator can be used as an individual trading system. The input parameters are the binding coordinates of the indicator window to the left top corner of the main chart. You can at
I don't understand what "I include the Spread which I have to in order to compensate for the Broker " means
if (OrderPrice >= (AskPN + TakeProfit + SpreadC)) //Take Profit
will be true when the trade is in loss
You need sometyhing like
if(Bid-(OrderPrice+TakeProfit)>=0)) //Take Profit
Buy orders open at Ask and close at Bid
and you will need to select the trade somewhere in your code
Hello GumRai, thank you so much for your response.I just realised I messed up the code when I posted the example. I have edited it and it should be in order now.Yes, your suggestion works just as it should, but can you perhaps explain why I would open at Ask and close at Bid?If that is true with Buy positions then I will be reaching my Take Profit even faster as the Bid Price is generally lower than the Ask?
BidPN = Bid;
if (BidPN >= (OrderPrice + TakeProfit + SpreadC)) //Take Profit
//Close Trade with 50 Pips of Profit
else if (BidPN <= (OrderPrice - StopLoss)) //Stop Loss
//Close Trade with 25 Pips of Loss
That way this should be as such?
Also about the spread. I'm just stating that I am putting Spread into my Take Profit calculation because the price must rise 50 Pips + Spread to hit my Take Profit, but when I am calculating my Stop Loss I do not include the Spread. I believe this is right.
but can you perhaps explain why I would open at Ask and close at Bid?If that is true with Buy positions then I will be reaching my Take Profit even faster as the Bid Price is generally lower than the Ask?
Because Buy trades are opened at ask and closed at bid, you have no choice in the matter.
When price is moving in an upward direction, a level is hit by the Ask first, because the Bid price is lower than the Ask
Maybe you could consider using something like this in your code?
If(OrderSelect() ) //Insert whatever way you are selecting the order
Print("Error Closing Order#"+(string)OrderTicket()+". Error Code "+(string)GetLastError());