I finished my code.I did something simple to understand how it works.I had no errors and warnings on meta editor,but after testing on strategy tester I got error 130(invalid stops).Can I get answer ?where is an error in my code and how to fix errors if errors are coming on strategy tester?How to find errors before I try strategy tester if no errors after compiling?
Yes invalid stops. Change the code where you set ordersend, to either include not sl and tp but stoploss and takeprofit that you set before start function or change sl and tp variables to take those values instead of OrderStopLoss and OrderTakeProfit. Those 2 functions serve absolutely no function there. They return 0, so you set no sl or tp.
WHRoeder:
so look at the log, see the error message, reread my post #3
Hi,
I was trying to ajust my code for 5 digit broker.No errors after compiling,but can you check my errors?Is ajustment for 5 digits in right position in the code?
el90ras:
I was trying to ajust my code for 5 digit broker.No errors after compiling,but can you check my errors?Is ajustment for 5 digits in right position in the code?
WHRoeder:
You didn't change ANYTHING, TP, SL, or slippage. Go back to my previous post #4 and look at the bottom comment.
I am in trouble.I do not knew where to put it.I was trying diferent places of code and had a lot of errors after compiling.After what part of code ajustment goes in the code?
//+------------------------------------------------------------------+//| expert initialization function |//+------------------------------------------------------------------+int init()
if(Digits==3||Digits==5) // error is here in front of if
{dxPoint=10;Slipage=Slipage*dxPoint;
//----return(0);
}
//+------------------------------------------------------------------+//| expert deinitialization function |//+------------------------------------------------------------------+
I have error 'if'- semicolon expected in front of if after compilind .What is wrong?
Hi,
I finished my code.I did something simple to understand how it works.I had no errors and warnings on meta editor,but after testing on strategy tester I got error 130(invalid stops).Can I get answer ?where is an error in my code and how to fix errors if errors are coming on strategy tester?How to find errors before I try strategy tester if no errors after compiling?
so look at the log, see the error message, reread my post #3
Hi,
I was trying to ajust my code for 5 digit broker.No errors after compiling,but can you check my errors?Is ajustment for 5 digits in right position in the code?
I was trying to ajust my code for 5 digit broker.No errors after compiling,but can you check my errors?Is ajustment for 5 digits in right position in the code?
You didn't change ANYTHING, TP, SL, or slippage. Go back to my previous post #4 and look at the bottom comment.
You have to use the values calculated in that code to modify your SL, TP, Slippage accordingly.
If you don't understand the code you have been given it's time to learn and understand it . . . . or simply give up.
I have error 'if'- semicolon expected in front of if after compilind .What is wrong?