Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1053

 
artmedia70:
To express something as a percentage, you need to know what it is supposed to be a percentage of.

In this case, the percentage from the price of the high to the low is 100%, but how do you explain that to mql?

 
kocunyc89:

in this case the percentage from the price of the high to the low is 100%, but how does mql explain this?

First, you should try to explain the percentage of high-low of which candle you want to express in words. And then what to do with it - what to compare it with, what to calculate?
 
Why complicate things? Take a ratio without percentage conversion, for example, (Open1-Close1)/(High1-Low1), and put it into a variable, but make sure you normalize it. That's all. Although, maybe there are some situations, when this variable should be exactly in percentage, I do not know. Well, then I would just multiply it by a hundred.
 

Hello!

1) The fastest way to receive information from another indicator (GlobalVariableSet - GlobalVariableGet) will be through OnTimer? Will it be delayed by 1 tick through OnTick? Are there other options?

2) How to detect manually opened positions in an Expert Advisor?

 

Gentlemen pros, help me implement the following: There is a channel displaying the borders as lines (brown). How do I make when a white line comes out of this channel top/bottom that area would be painted (as on the screenshot). In the screenshot I am using"Draw Rectangle" xD

 
AlexeyVik:
Read this one, it's very useful.
Thank you, I will definitely study it)
 
artmedia70:
First you should try to explain clearly just in words the percentage of high-low of which candle you want to express? And then what to do with it - what to compare it to, what to calculate?
Thank you very much Dear Sir! Fortunately I did not need your advice/answer, because I have changed the subject of my EA) Now I have new questions)
 
Guys, could you please tell me how to add a stop loss to an EA atp (7,or 14 etc...)?
 

Can you tell me where the error is in the code (the sell order should open if the current (zero) bar opening is less than the maximum of the previous one)?


extern double TP = 500;
extern double SL = 500;
extern double Lot = 0.01;

int ticket;

int start()
{

for(int i=0; i>=0; i--)
{

if (Open[i] < High[i+1]
)
{


ticket=OrderSend(Symbol(),OP_SELL,Lot,Bid,2,Ask+SL*Point,Bid-TP*Point, "xuita",16384,0,Green);
continue;
}


}
return(0);
}

 
zasuka In the screenshot I'm using "Drawing a Rectangle" xD

I wish it were like this! Set a problem and solve it yourself!!! Yes, everyone should know about"Drawing a Rectangle" xD.