[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 160
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Then you need RangeBars_fromM1_time
Set any number of points!
Does it also work by time as I explained?
Does it also work by time as I explained?
I don't know how you explained it! Try and figure it out, there's tons of stuff in CodeBase, Doku, Tutorial, and you'll get the hang of it. I have given you what I have, but I'm not working on it now, I'm working on mine! Learn!
is a long way of trial and error.
and public libraries have been tested by hundreds (thousands) of people.
although such an ancient lossless function by the kimiv guru proved to be unworkable ((in your hands))
Come on... You just don't know how to cook it. You know what you could break?
There is a function, there is an idea, there is a computer. You can't connect these things together.
There's a mug, a brew, sugar and boiling water. Some people make delicious tea and you make inedible rubbish... Probably a bad kettle...
Has anyone done statistics by day, e.g. for the year Monday was up more often, Tuesday down, etc. They say it is possible to write an indicator. Who has thoughts?
You can check by day in the tester, excluding a day in each run, but only for the first position opening, because if a position is already opened, you need to bring it to the desired result. But it makes sense to check it by hours and decide for yourself from what hour you should open the first position. And much depends on the TS. For example, at the moment I start at 9 on the server and do not open position after 19 o'clock, if there are no positions. Try it!
Not that, I just need the statistics that for the past year (today 16.02.13, so from 16.02.12 and so periods can be chosen) for all Mondays of the selected period was up or down and so for each day of the week. If this can be done in the strategy tester, please advise how to do it.
Not that, I just need statistics that for the past year (today 16.02.13, so from 16.02.12 and periods can be selected) for all Mondays of the selected period was up or down and so for each day of the week. If it is possible to do it in the strategy tester, then please advise how to do it.
Please, advise how to specify the condition correctly. If there is an open BUY order, if it is at breakeven, then we set BUYSTOP:
static bool flag ;
if(NewBar())
flag = true;
for(i=0;i<total;i++)
{
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if(OrderSymbol()==Symbol() && OrderMagicNumber()==123)
{
if(OrderType()==OP_BUY)
{
if(OrderStopLoss()>OrderOpenPrice())
{
if(Ask>m && frUP>0 && flag)
{
price = NormalizeDouble(frUP+(Ask-Bid)+30*Point,Digits);
takeprofit = NormalizeDouble(price+tp*Point,Digits);
ticket = OrderSend(Symbol(),OP_BUYSTOP,Lots,price,5,Bid-sl*Point,takeprofit,"Fractal",123,TimeCurrent()+72000,Blue);
if(ticket>0)
flag = false;
else
Print("Error ",GetLastError());
}
}
}
}
}
doesn't work!!!