Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 74
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
Greetings all, I have a question: is it possible to open a position at the close of a bar (working on 15-minute bars), if yes, how to implement it using mt4?
It is impossible to know if this is the last tick on this bar or not. It is better to open a position at the next bar opening.
I need to calculate the volumes of all open by and sell positions
I try to do it, but it doesn't work(((
//+--2.1 determination of order quality
int vb=v,vs=v, io, ko=OrdersTotal();
for (io=0; io<ko; io++)
{if (OrderSelect(io, SELECT_BY_POS, MODE_TRADES))
if (OrderType()==OP_BUY) { vb=vb+OrderLots( ); // add buy volumes
}
if (OrderType()==OP_SELL ) { vs=vs+OrderLots( ) ; // add the sell volumes
}
}
Print("Orders buy ",Koob," by ",vb," lot," Sell orders = ",Koos," by ", vs," lot );
vb and vs sum of by and sell orders are always zeroed out for some reason
vb and vs the sum of by and sell volumes respectively are always zeroed out for some reason
Oh, Semyon Semyonych.
Thank you.
Guys help with the following question...
Is it possible to delete Global Variable (GlovalVariable) only if EA is deleted from chart ?
If yes, how ? Just by adding GlobalVariableDelete (name) to deinit, the variable is deleted when switching between Timeframes....
Guys help with the following question...
Is it possible to delete Global Variable (GlovalVariable) only if EA is deleted from chart ?
If yes, how ? Simply adding GlobalVariableDelete (name) to deinit deletes the variable when switching between Timeframes....
Analyse the reason for deinitialisation:
UninitializeReason()
Analyse the reason for deinitialisation:
UninitializeReason()
I call the loop at the moment "deinit"
The order deletes all but the last one.
I think this line is most likely an error >> for (int i=1; i<=OrdersTotal(); i++) <<
However, logically everything seems to be correct... what did I miss ?
Thanks in advance!
//-------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------