Good afternoon, dear ones. I can't understand and can't find on the forum what's the reason why in the tester five positions open using the attached code (naturally ignoring the slip), but in the demo only one. Can anyone tell me what the reason is, or what is missing in the code? Thanks.
Damn, for some reason I can't see the pasted piece of code. it's not clear whether it's there or not. just in case, I'm pasting in text: if(total==0 && conditions && timeBar!=iTime(Symbol(),Period(),1)) { int poz = OrderSend(Symbol(),OP_SELL,lot,Bid,slip,0,0,NULL,magic,Red); Sleep(10000); poz = OrderSend(Symbol(),OP_SELL,lot,Bid,slip,0,0,NULL,magic,Red); Sleep(10000); poz = OrderSend(Symbol(),OP_SELL,lot,Bid,slip,0,0,NULL,magic,Red); Sleep(10000); poz = OrderSend(Symbol(),OP_SELL,lot,Bid,slip,0,0,NULL,magic,Red); Sleep(10000); poz = OrderSend(Symbol(),OP_SELL,lot,Bid,slip,0,0,NULL,magic,Red); timeBar=iTime(Symbol(),Period(),1); }
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.
How can I make an indicator open with a specific template? ChartApplyTemplate is not suitable, because the indicator should be in one file.
Create the appearance of the chart by the indicator itself.
For example, after adding an indicator, the graph should be converted to "Line Charts" mode. Which function can I use to set it?
ChartSetInteger()
Although you didn't explain what Line Charts is, and I'm not sure I understand what you mean.
ChartSetDouble()
ChartSetInteger()
Although what Line Charts you didn't explain, and I'm not sure I understand what you mean.
Bar Charts (Alt+1); Candlesticks (Alt+2); Line Charts (Alt+3);
From the documentation
{
int poz = OrderSend(Symbol(),OP_SELL,lot,Bid,slip,0,0,NULL,magic,Red);
Sleep(10000);
poz = OrderSend(Symbol(),OP_SELL,lot,Bid,slip,0,0,NULL,magic,Red);
Sleep(10000);
poz = OrderSend(Symbol(),OP_SELL,lot,Bid,slip,0,0,NULL,magic,Red);
Sleep(10000);
poz = OrderSend(Symbol(),OP_SELL,lot,Bid,slip,0,0,NULL,magic,Red);
Sleep(10000);
poz = OrderSend(Symbol(),OP_SELL,lot,Bid,slip,0,0,NULL,magic,Red);
timeBar=iTime(Symbol(),Period(),1);
}
If the indicator runs the code for a long time, are the ticks skipped during this time or queued for processing?