[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 197
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Explain. I don't understand. Why the condition
int Takeprofit = 62;
pp = MarketInfo(OrderSymbol(), MODE_POINT);
if(OrderTakeProfit() - OrderOpenPrice() < Takeprofit*pp )
it works as true? Although both parts are equal!!! As you can see below.
2009.08.22 18:50:31 1999.10.11 23:43 Delta EURUSD,M1: OrderTakeProfit() - OrderOpenPrice() = 0.0062 Takeprofit*pp = 0.0062
Thank you!
Since you work with real numbers, you should know that 0.0062 can actually be 0.0061999 or 0.0062001.
Use normalisation.
Since you work with real numbers, you should know that 0.0062 can actually be 0.0061999 or 0.0062001.
Use normalisation.
I tried normalizing Takeprofit*pp - nothing worked. Maybe both sides of the equation should be normalized?
I tried normalising Takeprofit*pp - nothing worked. Maybe both sides of the equation ( the inequality) need to be normalised?
Yes.
The second option is to work with int type, for example:
Yes.
The second option is to work with int type, for example:
>> Thank you!
Hello!
How do I change the colour of the indicator line depending on the condition - for example, so that different ranges of bars have different colours?
The SetIndexStyle function, which is supposed to do this, does not work by setting the colour or line thickness - see figure
See example code below.
Each bar should be a different colour and thickness, but they are all just red and 2 thick.
Hello!
How do I change the colour of the indicator line depending on the condition - for example, so that different ranges of bars have different colours?
The SetIndexStyle function, which is supposed to do this, does not work by setting the colour or line thickness - see figure
See example code below.
Each step should be a different colour and thickness, but they are all just red and thickness 2.
Use additional buffers, each with their own style and colour
Use additional buffers, each with their own style and colour
Once initiated a similar question, and together we worked out what should have been clear :)))
SetIndexStyle when used at start honestly changes colour, but the whole buffer at once. That is, in the current chart, the buffer (line) will have the colour corresponding to the last triggered SetIndexStyle application.
Hello!
How to change the colour of the indicator line...
Look here .
Once initiated a similar question, and together we worked out what should have been clear :))
SetIndexStyle when used at start honestly changes colour, but the whole buffer at once. That is, in the current chart, the buffer (line) will have the colour corresponding to the colour of the last triggered SetIndexStyle application .
Thank you very much, granit77.
That's a comprehensive answer.
I suspected as much, but I couldn't believe that such a strange idea was embedded in this function.
It may be necessary to change the colour of the whole buffer for some purposes, but more practical is
But the mechanism of coloring (and changing other attributes) of some parts of the indicator.
EasyLang, for example, has it.
I will write to the developers.
Is there a more detailed description of MQL functions somewhere?
With the examples of some or other parameters?
All the parameters have to be either tested by myself or taken from third-party examples.