what should i do here?
Files:
Capture.PNG
68 kb
- Fix your compile errors.
- Then fix your compile warnings.
- Do you really expect an answer? We can't see your broken code — we can only guess. There are no mind readers here and our crystal balls are
cracked.
General rules and best pratices of the Forum. - General - MQL5 programming forum
i just add the code to. below.
hope that wont blow your cracked crystal balls
Files:
ScalpingSystem.mq4
13 kb
You've fixed your errors, now fix your warnings.
-
int OnInit() { UsePoint = PipPoint(Symbol()); } //<< not all control paths return a value ScalpingSystem__1.mq4 43 3
OnInit returns an int, you don't. Go to the documentation and find out what value you should return. - return value of 'OrderSelect' should be checked ScalpingSystem__1.mq4 127 7Check your return codes for errors, and report them including GLE/LE. Don't look at it unless you have an error. Don't just silence the compiler, it is trying to help you.
return value of 'OrderSelect' should be checked ScalpingSystem__1.mq4 183 7
return value of 'OrderSelect' should be checked ScalpingSystem__1.mq4 257 7
return value of 'OrderSelect' should be checked ScalpingSystem__1.mq4 312 7
What are Function return values ? How do I use them ? - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles -
BuyTicket = 0; } return(0); //<< 'void' function returns a value ScalpingSystem__1.mq4 364 4 //Chart output for the signal Comment ("The Current Signal: ",signal + " \n The Current Risk in Percent: "+EquityPercent+ " \n The Current Lot Size is: "+ LotSize+ " \n Account Balance: "+ AccountBalance()+ " \n Your Current Equity: "+ AccountEquity() ); } // OnTick
OnTick is a void function, how do you expect to return zero? - You don't expect your Comment to work as you return before calling it?
- There is no need to open an order and then set the stops. Simplify your code - do it in one step. TP/SL on OrderSend
has been fine for years.
Build 500 № 9 2013.05.09
Need help me mql4 guru add take profit to this EA - Take Profit - MQL4 programming forum 2017.09.27
William Roeder:
You've fixed your errors, now fix your warnings.
You've fixed your errors, now fix your warnings.
- OnInit returns an int, you don't. Go to the documentation and find out what value you should return.
- Check your return codes for errors, and report them including GLE/LE.
Don't look at it unless you have an error. Don't just silence the compiler, it is trying to help you.
What are Function return values ? How do I use them ? - MQL4 programming forum
Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles - OnTick is a void function, how do you expect to return zero?
- You don't expect your Comment to work as you return before calling it?
- There is no need to open an order and then set the stops. Simplify your code - do it in one step. TP/SL on OrderSend
has been fine for years.
Build 500 № 9 2013.05.09
Need help me mql4 guru add take profit to this EA - Take Profit - MQL4 programming forum 2017.09.27
Do you have wings? it seems your an angel.
thanks for the time you took to answer.
it helped a lot!
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