Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 1008

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
So this is correct?
if (OrderOpenTime()+7200+15*60 <=TimeCurrent()) Cls_Buy=true;
if (OrderOpenTime()+7200+900 <=TimeCurrent()) Cls_Buy=true;
and end up like this?
if (OrderOpenTime()+8100 <=TimeCurrent()) Cls_Buy=true;
when the current one is closed, the number of buy orders will decrease, or they will be absent at all (depends on the algorithm), you do this check and delete the pending orders
something like this (in this case, on the contrary, the pending orders are deleted if an earlier placed buy has closed at profit):
If this happens - I increase Stop Loss to the required size. I don't set threshold, but leave it virtual in the program and open an order. As a result, only one of 15 to 20 orders opens. What should I do to open every order?
RefreshRates();
double bid = MarketInfo(symbol,MODE_BID);double ask = MarketInfo(symbol,MODE_ASK);
double stoplevel = NormalizeDouble(stoplevelTemp * tickTemp,digitsTemp)+tickTemp;
if(digitsTemp == 5 )stoplevel+=(700 * tickTemp);
if(spreadOrdDangBr < stoplevel) //если спред меньше стоплевела - перебиваем
spreadOrdDangBr=stoplevel;
double lotDB = calculationLot(spreadOrdDangBr,0.0025); //расчитываем лот - четверть процента свободных денег
slODB=ask-spreadOrdDangBr;
tpODB= ask+ spreadOrdDangBr;
orderTicketODB=OrderSend(symbol,OP_BUY,lotDB,ask,3,slODB,0,("dangBr" +spreadOrdDangBr));
and as a result in the terminal
Help, please! I want to open Buy position, and if price goes up by 100
pips, my stop loss will become equal to zero relative to the previous stop loss.
Am I doing it correctly?
if(Bid-OrderOpenPrice()>Point*100)
{
OrderModify(OrderTicket(),OrderOpenPrice(), 0,TakeProfit,0,);
return(0);
}
Thank you!
Hi all) how to determine the maximum price of a selected bar ( e.g. 100th )
I found a function that defines the maximum and minimum price for 100 bars and draws horizontal lines (please help me to make the first 15 bars pass and only then check for 100 (how do I make this shift?) and another problem with lines - it draws only 1 time - that is - if we go another 100 points with new highs and lows - the lines are not drawn) anyone know please write down - here is the code
extern inttern Quant_Bars=100; // Number of bars
//--------------------------------------------------------------------
int start() // Special function start
{
int i; // bar number
double Minimum=Bid; // Minimum price
Maximum=Bid; // Maximum price
for(i=0;i<=Quant_Bars-1;i++) // From zero (!) to
{ // ...Quant_Bars-1 (!)
if (Low[i]<Minimum) // If < known
Minimum=Low[i]; // this will be the Min
if (High[i]> Maximum) // if > known
Maximum=High[i]; // it will be max.
}
Alert("For the last ",Quant_Bars, // Display
"Min= ",Minimum," Max= ",Maximum);
double linia1=ObjectCreate("highLine",OBJ_HLINE,0,0,Maximum);
double linia2=ObjectCreate("lowLine",OBJ_HLINE,0,0,Minimum);
return(0); //exit start()
}
Guys, if the indicator draws non-standard graphical objects, is it possible to access them? The problem is that they are not displayed in the list of objects (when All button is pressed) and ObjectsTotal() function doesn't see them. When I try to access the objects by their name, GetLastError() returns error 4202 (function ObjectFind())