Quote:
|
Originally Posted by ralph.ronnquist
The stoploss and takeprofit parameters to OrderSend are "price values" and not pips. Try using "Ask-stoploss*Point" and "Ask+takeprofit*Point" instead; when it comes to EA writing, not only the trend is your friend, but so is the manual ;-)
|
Ralph,
Thank you very much for your patient and polite responses. I know the mistakes were really dumb ones. As a beginner I didn't know where to begin when the EA passed muster with compiler, and the Strategy Tester said it loaded successfully, but would not produce any results.
Prior to posting my request I had actually tried something close (but obviously not correct) to what is in the manual. That earlier version passed muster with the compiler, but the Stategy Tester rejected the OrderSend syntax. So I looked at the OrderSend statement in the EA that I had made some mods to, to see its syntax. That's where I derived the bad syntax. What I now understand is the author of that EA prefined "stoploss" and "takeprofit" using the correct syntax before the OrderSend statement is executed.
Have some programming experience with Fortran and Basic, but the MQL4 language is challenging for me right now.
Thanks again for your succint and polite responses. They were most helpful.
Raft
BTY Now that the EA runs I can see I have a couple logic errors in the EA as well, but I'll figure those out now that I have the syntax issues behind me.