Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
Rectangle tool which counts number of candles contained within
Hello chaps,
I'm wondering if any of you fine fellows knows how to re=program the rectangle tool so that it counts how many candles periods are contained within it. Reasoning behind this is that during a range, the longer it continues, the greater and stronger the breakout.
Anyone have this or can let me know how to program this?
Can anyone tell me why the following indicator code will plot a down arrow but will NOT plot a price label. Any other style will show up at the correct level, but it doesn't have the price shown?
int init()
{
DeleteAllObjects();
IndicatorBuffers(2);
SetIndexBuffer(0,Buy);
SetIndexStyle(0,DRAW_ARROW,DRAW_ARROW,BuySize,BuyC olor);
SetIndexArrow(0,SYMBOL_LEFTPRICE); < doesn't show up
SetIndexShift(0,1);
SetIndexBuffer(1,Sell);
SetIndexStyle(1,DRAW_ARROW,DRAW_ARROW,SellSize,Sel lColor);
SetIndexArrow(1,SYMBOL_ARROWDOWN); < plots just fine
SetIndexShift(1,1);
On this site, at this link http://www.forex-tsd.com/87589-post372.html is a copy of the DIN_Kukus_EA_V2.6. If you view the EA's contents, you will find a function that checks for order losses in your order history, just as you have discribed doing for yourself. You can use this working example of how to extract the number of successful trades from your order history. You can modify it to extract history for a particular period of time as well, but I hope this will help you see how to accomplish what you propose to do for yourself...
Hi Wiley,
Thanks for the help.
To be honest, I have been so busy working on a solution, I forgot that I posted the question.
I spent that day going through the mql4 manual and figured out a way to do it.
When it is time to start trading, I set a variable called "OpeningTime" equal to the current time. During the trading session and if a trade has been closed, I have the EA cycle through the order history and look for any orders that are from the given chart and EA and also have a closing time that is greater than "OpeningTime". It then compares the profit (or loss) of the order (using the OrderProfit() function) with what I have set (with an external variable) as being enough. I set it up so that I can stop trading if I made enough of a profit and/or if I have lost a given amount.
Backtesting has shown that it really doesn't improve the results of an already optimized EA any (in fact, more often it makes them worse), which is to be expected because we never know if the next trade (which I have now eliminated) will make things better or worse.
It does allow me to set more stringent conditions from the start though. So, the EA can be optimized using the "get out, I've had enough" option from the start. And that does seem to make my results quite a bit better.