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.
As we know there are some requests about drawing rectangles on charts or just to make our custom indicators more "beautiful". By this I have made a function that can be used to do this kind of thing. Just give me credits for it if you use it, that's all I ask. So you probably asking how it works, for sure this is not the best way but for now is the way I can do, it gets the character 110(the square) from the font wingdings and draw 1, 2, 3...anyway how much it needs to make the cell, but don't worry the function is made to calculate how much squares are needed to don't be too heavy to draw. I hope soon metaquotes let us draw rectangles without making things like these.
To use it is simple:
nWindow = The window that will be used to draw.
nCellName = The base name for the cell(it's a base name so if it needs to draw 2 or more squares the names will be like "basename1", "basename2"...
nX = The top corner X position.
nY = The top corner Y position.
nWidth = Width of the cell.
nHeight = Height of the cell.
nColor = Color.
Quote:
//================================================== =======
// DrawCell.
//
// Author: Alexandre A. B. Borela
// Description: Draws a cell using the minimum character
// as it can, so it's going to take less time
// to draw the cell.
void DrawCell(int nWindow, string nCellName, double nX, double nY, double nWidth, double nHeight, color nColor)
{
double iHeight, iWidth, iXSpace;
int iSquares, i;
if(nWidth > nHeight)
{
iSquares = MathCeil(nWidth/nHeight); // Number of squares used.
iHeight = MathRound((nHeight*100)/77); // Real height size.
iWidth = MathRound((nWidth*100)/77); // Real width size.
iXSpace = iWidth/iSquares - ((iHeight/(9-(nHeight/100)))*2);
That was made by me and it's not available yet, for now I'm just dealing with the function that generate those signals because it calculate over a lot of bars to generate a signal for each time frame, this make some lags as you may imagine, as soon as I make it better I'll post here.
Last edited by FrankUnique; 07-08-2008 at 10:25 PM.