What's wrong with the code? Trying to catch the end of the test
void MyHistory()
{
//--- select history for access//HistorySelect(0,TimeCurrent());HistorySelect(0,TimeTradeServer());
//---int orders=HistoryDealsTotal(); // total history dealsint losses=0; // number of losses orders without a breakfor(int i=orders-1;i>=0;i--)
{
ulong ticket=HistoryDealGetTicket(i);
if(ticket==0)
{
Print("HistoryDealGetTicket failed, no trade history");
break;
}
//--- check symbolif(HistoryDealGetString(ticket,DEAL_SYMBOL)==_Symbol)
continue;
//--- check profitstring deal_comment=HistoryDealGetString(ticket,DEAL_COMMENT);
if(deal_comment=="end of test")
{
Print("!!!!!!!!!!!!!!! END TEST !!!!!!!!!!!!!!!!");
break;
}
/*
if(deal_comment!="end of test")
{
return;
}
*/
}
//---return;
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Thank you.
Igor Makanu:...should only put the arrow where the condition is met...
However, it puts it on the second bar.
Check the indexing direction of the indicator buffer.
Check the indexing direction of the indicator buffer.
What to check, this code should put the arrow on which bar?
{ //--- int limit=rates_total-prev_calculated; if(limit>1 || prev_calculated==0) { limit=rates_total-2; ArrayInitialize(BufferUP,EMPTY_VALUE); ArrayInitialize(BufferDN,EMPTY_VALUE); } for(int i=limit; i>=0; i--) { if(fabs(high[i+1]-high[i])<=_Point*(double)Pips) BufferDN[i]=high[i]; else BufferDN[i]=EMPTY_VALUE; } //--- return value of prev_calculated for next call return(rates_total); }What should I check, this code should put the arrow on which bar?
BufferUP and BufferDN what is the indexing?
BufferUP and BufferDN what is the indexing?
Did it the other way around.
still puts it on the second bar.
Did it the other way around.
Still puts it on the second bar.
All arrays must be in the same direction
All arrays must be in the same direction
Well then the first option is correct, what's the problem?
Well then the first option is correct, what's the problem?
The problem is that you can't see the full listing of the indicator
This puts it like this on the first bar, but the arrow does not appear in real time, only after switching thef. What is wrong?
In OnInit() ArraySetAsSeries() for BufferUP and BufferDN, in OnCalculate() - ArraySetAsSeries() for high and low
if(limit>1)
{
}
No need for prev_calculated==0
In OnInit() ArraySetAsSeries() for BufferUP and BufferDN, in OnCalculate() ArraySetAsSeries() for high and low
Thanks.
What's wrong with the code? Trying to catch the end of the test