[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 894
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
What is your point? It's like you can ask about the time... or health... :))))))
That's just a reminder. I read the book, but there are points that need to be clarified - so I write them. and sometimes there is no answer.
Please - don't take this aggressively, I mean it in good faith!
That's just a reminder. I read the book, but there are points that need to be clarified, so I write them. and sometimes there is no answer.
Do you pay for the answers? No? Or you are ignored? Or someone owes you a favor?
SZS: I often look in this thread, how can I help, but on condition that the person who asked a question, at least he understands what he asked, while you have your mountain of questions looks like lazy to read - explain it to me
slb =NormalizeDouble(Bid - (StopLoss * Point),Digits); // calculate stop for buy positions//
tpb =NormalizeDouble(Ask + (TakeProfit* Point),Digits); // calculate profit for buy positions//
sls =NormalizeDouble(Ask + (StopLoss * Point),Digits) // calculation of stop for sell positions//
tps =NormalizeDouble(Bid - (TakeProfit* Point),Digits);
//================================================== ==================//
int total=OrdersTotal();
int n=0;
for (int i=total-1; i>=0; i--)
{
if(OrderSelect(i, SELECT_BY_POS))
{
if(OrderSymbol()==Symbol())
{
n++;
}}}
if ( total == 1 )
{
for (int k=total-1; k>=0; k--)
{
if(OrderSelect(k, SELECT_BY_TICKET)
Alert("order is", k);
{
if ((OrderType()==OP_BUY)&&(OrderTakeProfit()==0)&&(O rderStopLoss()==0))
{
OrderModify(k,OrderOpenPrice(),slb,tpb,0,Blue);
Alert("error", GetLastError());
}}}}
return(0);}
WHAT'S THE PROBLEM PLEASE HELP ...........?????
Do you pay for the answers? No? Or are you being ignored? Or do you owe anything to anyone?
ZS: I often look in this thread, what I can, I help, but provided that the person who asked a question, at least he understands what he asked, with your mountain of questions looks like lazy to read - deal with me
I told you not to take it too hard. We're not here to fight. I also do not like it when someone refuses to help - that is, he decides for me to give advice or read a book. As they say - clever!
Once again, guys, please do not take it aggressively or my request is still a contradiction, if so, then I will not write it anymore.
Does anyone know a script "trailing stop" triggered by levels, i.e. price reached 150 - stop 130, then reached 180 - stop 170 (for example) (levels typed by yourself).
Thank you in advance.
Hi ! I can't figure out what the problem is ???? Does not modify market order
slb =NormalizeDouble(Bid - (StopLoss * Point),Digits); // calculation of stop for buy positions//
tpb =NormalizeDouble(Ask + (TakeProfit* Point),Digits); //calculate profit for buy positions//
sls =NormalizeDouble(Ask + (StopLoss * Point),Digits); //calculate stop for sell positions//
tps =NormalizeDouble(Bid - (TakeProfit* Point),Digits);
//================================================== ==================//
int total=OrdersTotal();
int n=0;
for (int i=total-1; i>=0; i--)
{
if(OrderSelect(i, SELECT_BY_POS))
{
if(OrderSymbol()==Symbol())
{
n++;
}}}
if ( total == 1 )
{
for (int k=total-1; k>=0; k--)
{
if(OrderSelect(k, SELECT_BY_TICKET))
Alert("order exists", k);
{
if ((OrderType()==OP_BUY)&&(OrderTakeProfit()==0)&&(OderStopLoss()==0))
{
OrderModify(k,OrderOpenPrice(),slb,tpb,0,Blue);
Alert("error", GetLastError());
}}}}
return(0);}
WHAT'S THE PROBLEM HELP ...........?????
You are selecting a position on the ticket. But you don't check exactly WHERE it is... The position may be in already closed ones:
bool OrderSelect( int index, int select, int pool=MODE_TRADES)
This function selects an order for further manipulation. Returns TRUE if the function completes successfully. Returns FALSE if the function fails. To get information about an error, you need to call GetLastError() function.
The pool parameter is ignored if the order is selected by the ticket number. The ticket number is a unique identifier for the order. To determine from which list an order is selected, its closing time must be analysed. If the time of closing of the order is 0, then the order is open or pending and is taken from the list of open positions of the terminal. An open position can be distinguished from a pending order by its type. If the time of closing is not equal to 0, then the order is closed or pending and has been selected from the history of the terminal. The distinction between a closed order and a deleted pending order can also be made by order type.Does anyone know a script "trailing stop" triggered by levels, i.e. price reached 150 - stop 130, then reached 180 - stop 170 (for example) (levels typed by yourself).
Thank you in advance.
Hi ! I can't figure out what the problem is ???? Doesn't modify the market order
Try it like this:
Does anyone know a script "trailing stop" triggered by levels, i.e. price reached 150 - stop 130, then reached 180 - stop 170 (for example) (levels typed by yourself).
Thank you in advance.