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

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
I think that's why
I think that's why.
Thanks, noticed and deleted the post immediately, but you managed to reply to it :)
I still don't like my cyclic pattern...
The task is to close order after n-number of unsuccessful attempts to modify it according to the market!
Please show me how to do this nicely in code.
Thank you!
I think it's because of this.
Conclusion:
2010.09.14 16:46:04 2010.06.07 00:00 MM1.20 EURUSD,M5: OrderModify error 130
2010.09.14 16:46:04 2010.06.07 00:00 MM_1.20 EURUSD,M5: In-Cycle1 Modification
2010.09.14 16:46:04 2010.06.07 00:00 MM_1.20 EURUSD,M5: SL modification, trying to set a new SL, ord_open_sell=1.19799000 stop_TP=200 Old SL=1.20499000 Bid=1.19470000 ord_take_profit=1.19479000 Ask=1.19483000
2010.09.14 16:46:04 2010.06.07 00:00 MM_1.20 EURUSD,M5: att_to_modify_sell=0
There was an error, so why am I not processing the condition
and consequently no prints are displayed...
A piece of code closes an order on the market after att_to_modify attempts!
Thank you!
Output:
2010.09.14 16:46:04 2010.06.07 00:00 MM1.20 EURUSD,M5: OrderModify error 130
2010.09.14 16:46:04 2010.06.07 00:00 MM_1.20 EURUSD,M5: Modification in loop1
2010.09.14 16:46:04 2010.06.07 00:00 MM_1.20 EURUSD,M5: SL modification, try to set new SL, ord_open_sell=1.19799000 stop_TP=200 Old SL=1.20499000 Bid=1.19470000 ord_take_profit=1.19479000 Ask=1.19483000
2010.09.14 16:46:04 2010.06.07 00:00 MM_1.20 EURUSD,M5: att_to_modify_sell=0
There was an error, so why am I not processing the condition
and therefore no prints are printed...
A piece of code closes an order on the market after att_to_modify attempts!
Thanks!
Error 130 - wrong stops.
Analyze the 3rd parameter in the function
ticket=OrderModify(ticket_sell,0,NormalizeDouble((ord_open_sell-stop_TP*Point),Digits),NormalizeDouble(ord_take_profit,Digits),0,0); //first transfer SL
this is a sell order, as I understood it, and the stop price is lowered
Maybe we need "+" - ord_open_sell+stop_TP*Point
Error 130 - wrong stops.
Analyze the 3rd parameter in the function
ticket=OrderModify(ticket_sell,0,NormalizeDouble((ord_open_sell-stop_TP*Point),Digits),NormalizeDouble(ord_take_profit,Digits),0,0); //first rollover of SL
this is a sell order, as I understood it, and you set the stop by the price
Maybe we need the "+" - ord_open_sell+stop_TP*Point
Thank you!
I'm not asking about this error. I'm asking why it's not working for me.
Thank you!
First, print the value of the ticket print after the modification
For starters, print the ticket value after the modification
I am writing a question but it did not change anything, the problem is not solved, so I will repeat it in the hope to get a solution to the problem:
I'm writing myself an indicator, I need about 2000 bars from history, such a loop:
for (int i=1; i<1900; i++)
it will retrieve only 1000 bars.
I try to set the Bars variable, but it says, that its value is 1000, despite the fact, that I have drawn the chart and historical data till 2000.
Why is this happening, what is wrong????
Please advise!!!!
For starters, print ticket value after modification
Shortened to
2010.09.14 20:35:26 2010 06.07 00:00 MM_1.20 EURUSD,M5: Modification complete2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: ticket=0
2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: OrderModify error 130
2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: Modification in Loop1
2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: SL modification, trying to set a new SL, order_open_sell=1.19799000 stop_TP=200 Old SL=1.20499000 Bid=1.19470000 order_take_profit=1.19479000 Ask=1.19483000
2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: att_to_modify_sell=0
Guys, I'm getting a glitch. How on error can
be naive 0-lu?Shortened to
2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: Modify finished2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: ticket=0
2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: OrderModify error 130
2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: Modification in Loop1
2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: SL modification, trying to set a new SL, order_open_sell=1.19799000 stop_TP=200 Old SL=1.20499000 Bid=1.19470000 order_take_profit=1.19479000 Ask=1.19483000
2010.09.14 20:35:26 2010.06.07 00:00 MM_1.20 EURUSD,M5: att_to_modify_sell=0
Guys, I'm getting a glitch. How on error can
be naven 0-lu?print -- ticket_sell and show ticket variable type