[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 1045

eddy:
I don't understand the calculation. Can you explain my drawing as an example?
If by beak, then what is in the circle, added one beak.

Hello all!

I am writing a trawl for 5M scalping. the trawl should be triggered 30 minutes (6 candles) after opening a trade. How can I mark this candle in which the trade was opened, or maybe it can be done in another way? Thanks in advance.

costy_:

In first variant second OrderSelect by ticketbuy, uses second check, I guess (if pending opening slips or +1 ordertotal...).

In previous post correctly found errors (except green).

Ticket buy is not marked in the second one. We need to identify


string symbol = Symbol();int cnt;
for(cnt = OrdersTotal()-1; cnt >= 0; cnt--){
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderSymbol() == symbol && OrderMagicNumber()==Magicbuy) {
lotsbuy2=OrderLots() ;
double bid = MarketInfo(symbol,MODE_BID);
ticketbuy=OrderTicket();
RefreshRates();
OrderClose(ticketbuy,lotsbuy2,bid,3,Magenta); }


abolk:

Uh-huh, mistake.

string symbol = Symbol();int cnt;
for(cnt = OrdersTotal()-1; cnt >= 0; cnt--){
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderSymbol() == symbol && OrderMagicNumber()==Magicbuy) {
lotsbuy2=OrderLots() ;
double bid = MarketInfo(symbol,MODE_BID);
ticketbuy=OrderTicket();
RefreshRates();
OrderClose(ticketbuy,lotsbuy2,bid,3,Magenta); }
} 

:)

the circle is not the point. think of it as being on the right)
I figured out that a normal linear regression channel is what I need. how do I get its values on bars?
costy_:

Uh-huh, mistake.

:)


:)
eddy:
how do I get the values of a linear regression channel on bars?

with ObjectGetValueByShift will work?)

eddy:
I figured out that a normal linear regression channel is what I need. how do I get its values on bars?

Follow the link below, good luck ;))

https://www.mql5.com/ru/code


I used this once (but not for long).

https://www.mql5.com/ru/code/7086

eddy:

will it work with ObjectGetValueByShift ?)

I think not ;))) when I was trying to get the values of the channel, not to mention the two points, the beginning and the end (that's in the beginning)) :((