[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 122

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
Take the period_converter script and modify the candlestick clipping condition to your liking, and you'll be happy. For example, at a glance, to get candles for x hours and 10 minutes:
replace with
or something like that)))
Hourly candlesticks with coeff=1 are always identical to the original, but the output is close to it :(Thanks for the genius idea! I tried everything I could think of, but the logic of the script is beyond me.
How to shift the opening of the hour candle in the Period_converter script by 10 minutes? Do I need to make changes at the stage of recording history?
Eh... I haven't wanted to take alcohol for eight years now - not interested in it... :)
Thanks for caring about your health ;)
You're always welcome.
I don't, and not just any alcohol, but... a lot of other things. I'm an active health scout myself.
Clocks with coeff=1 in the offline are always identical to the original, but the output is somewhere near :(Thanks for the brilliant idea! I tried everything I could think of, but the logic of the script is beyond me.
How can I move the opening of the hour candle in the Period_converter script by 10min? Is it necessary to change the history recording step?
hmm... run the script on minutes)
Good afternoon,
Could you please tell me how to put a marker on the chart? For example, the order did not open, but at least to see on the chart, at which point it should have opened.
I would like to see on the charts where it was supposed to open.
How do I make (if the previous trade was a buy trade) the next one open for sell? Thank you in advance.
I wrote it down like this, but it still opens for purchase.
I wrote it down like this, but it still opens for purchase.
It says here "if the number of orders is equal to a buy operation". What do you mean?
I don't pretend to be an expert, I just started to understand something myself, but this procedure is in almost any CODE BASE advisor !!!!
Declare CloseRevers at the very beginning
extern bool CloseRevers = true;
// This is placed in the check after the signal but before OrderSend
if (CloseRevers) CLOSEORDER(OP_SELL);
if (CloseRevers) CLOSEORDER(OP_BUY);
void CLOSEORDER(int ord)
{
for (int i=0; i<OrdersTotal(); i++)
{
if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) // <-----MODE_HISTORY if the trade has already been closed
{
if (OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
{
if (OrderType()==OP_BUY && ord==OP_BUY)
OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Bid,Digits),3,CLR_NONE);
if (OrderType()==OP_SELL && ord==OP_SELL)
OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Ask,Digits),3,CLR_NONE);
}
}
}
}
Accordingly, if you already have a closed trade, check with MODE_HISTORY (instead of MODE_TRADES)
Hope that helped....