Dear "fellow travellers" and captains! Question: how to make two different indicators to be shown in one separate window in the PROGRAM, not by drag and drop(!) - as on my
picture - here I first opened ROC and then dragged from the navigator" Bolinger". When I write indicator_separate_window in Bollinger - it opens in a separate window, but a different one!?
HOW DO I PRESCRIBE THE RIGHT "WINDOW"? :))
I don't know if it helps... But I use A/D indicator window search for my purposes like this:
WinID=WindowFind("A/D"); // Номер окна AD
Maybe if I prescribe the window number returned by this function as the number of the window to display the next indicator in, it will work?
Honestly - I haven't tried it; so... you've got an idea, you've got to try it... :)
as if the EA got a value and works itself - let's say the results differ from the number of ticks, but then on which TimeFrame to optimise and on which to use?
total = OrdersTotal();
THVOpenedPos = 0;
StohOpenedPos = 0;
THVOpenedPos = OrdersCountTHV ();
StohOpenedPos = OrdersCountStoh ();
Comment (total); // здесь всегда 0, даже если есть открытые позиции!
int OrdersCountTHV()
{
total = OrdersTotal();
if (total >0)
{
for (int i = 0; i < total; i++)
{
if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES)==true)
{
if (OrderMagicNumber() == THVMagic)
if (OrderSymbol() == Symbol())
{
THVOpenedPos++;
}
}
}
}
return (THVOpenedPos);
}
artmedia70: Well, there is nothing for it yet... :)
WOW! I was rejoicing too early... this function does not take it - it does not see it, although it is actively dragged with the mouse, probably JavaScript is needed... I wonder if it's possible to "embed" JavaScript in MQL?
Or a separate indicator may be written as "ROC+BAND" in one package... By any chance, don't you know how to compare ROC and MA or Bollinger values - in what units? Let's say you need to prescribe "if ROC crosses МА from the bottom up - buy... "Is there any indexes of conversion of readings of one indicator to another?
Dear "fellow travellers" and captains! Question: how to make two different indicators to be shown in one separate window in the PROGRAM, not by drag and drop(!) - as on my
picture - here I first opened ROC and then dragged from the navigator" Bolinger". When I write indicator_separate_window in Bollinger - it opens in a separate window, but a different one!?
HOW DO I PRESCRIBE THE RIGHT "WINDOW"? :))
I don't know if it helps... But I use A/D indicator window search for my purposes like this:
Maybe if I prescribe the window number returned by this function as the number of the window to display the next indicator in, it will work?
Honestly - I haven't tried it; so... you've got an idea, you've got to try it... :)
I don't know if this helps... But I use the A/D indicator window search for my purposes like this:
Maybe if I prescribe the window number that this function returned as the number of the window to display the next indicator in, it will work?
Honestly - have not tried, so ... I have an idea - you try it... :)
THANKS FOR YOUR PROMPT AND "SPICY" ANSWER! :))
I'll write-try and tell you how it worked!
THANK YOU FOR YOUR PROMPT AND "SPARKLING" RESPONSE! :))
I'll write it down, I'll try it out, I'll tell you how it turned out!
show how you use the ilow function
Hi all. Such a question:
int OrdersCountTHV() { total = OrdersTotal(); if (total >0) { for (int i = 0; i < total; i++) { if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES)==true) { if (OrderMagicNumber() == THVMagic) if (OrderSymbol() == Symbol()) { THVOpenedPos++; } } } } return (THVOpenedPos); }OrdersCountStoh (); is similar.
Why total is always 0?
Why is total always 0?
normally the order count is done like this
Then you don't have any open orders, normally the order count is done like this:
that's the thing... I am running a visualization in the tester and after I open a position the comment does not change :(
but order counting gives the right results ...
That's the thing... In the tester, in visualization mode, and after opening a position, the comment does not change :(
And the order count is correct ...
your total = OrdersTotal(); probably, it has been declared in global variables (at the very top) and maybe you changed it somewhere, try to add
same thing...
Well, there is nothing for it yet... :)
WOW! I was rejoicing too early... this function does not take it - it does not see it, although it is actively dragged with the mouse, probably JavaScript is needed... I wonder if it's possible to "embed" JavaScript in MQL?
Or a separate indicator may be written as "ROC+BAND" in one package... By any chance, don't you know how to compare ROC and MA or Bollinger values - in what units? Let's say you need to prescribe "if ROC crosses МА from the bottom up - buy... "Is there any indexes of conversion of readings of one indicator to another?