fabian waldo: But it seems to ignore the breakeven totally...
|
|
whroeder1:
|
I added this to my code but nothing came up in errors in the journal. Also code compiles with no errors at all.
if ( OrderSelect(i, SELECT_BY_POS,MODE_TRADES) == false) // do something if the OrderSelect did not work Alert("the order isn't close because Err no. ", GetLastError()); }
if ( OrderSelect(i, SELECT_BY_POS,MODE_TRADES) == false) // do something if the OrderSelect did not work
Alert("the order isn't close because Err no. ", GetLastError());
That doesn't make sense. The alert should relate to the OrderSelect() failing.
int BBM=OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,clrNONE);
OrderModify() returns a bool, not an int.
If it returns false then print an error report
if(!OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,clrNONE)) Print("Order Modify on ticket #",OrderTicket()," Failed. ERROR CODE",GetLastError());

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 have this in my EA and it compile and run with no errors. All trades are made in backtester as well. But it seems to ignore the breakeven totally...
Is there something wrong here?