Trying to get Simple SAR EA Backtesting to work

 

Following on from my previous posts I am trying to get the first SAR EA I have written to show results. (For MT4)

I have manged to get the default MA Indicators to work and show a result but the first one I wrote myself doesnt seem to be working.

I followed this guys instructions on Youtube:

https://www.youtube.com/watch?v=eYmrKZkmR14&t=337s

And here are all the screenshots

What are peoples thoughts ?




I also tested 1 complete Year and just the last few months.


And it doesnt show any trades where it defintely should



MQL4 TUTORIAL - SIMPLE SAR EXPERT ADVISOR
MQL4 TUTORIAL - SIMPLE SAR EXPERT ADVISOR
  • 2017.10.04
  • www.youtube.com
https://mql4tutorial.com With MQL4 for Metatrader4 we create a simple Expert Advisor for the Parabolic SAR Indicator that can produce dots above or below the...
 
Fred7777:
 

And it doesnt show any trades where it defintely should


The code does absolutely what you program. And this code doesn't open any trades because (at least) there isn't a OrderSend() in your code. You should read the documentation.

https://docs.mql4.com/trading/ordersend
 
Petr Nosek:

The code does absolutely what you program. And this code doesn't open any trades because (at least) there isn't a OrderSend() in your code. You should read the documentation.

https://docs.mql4.com/trading/ordersend

But I copied the code straight out of the guy on Youtubes. Why would it work for him and not for me ? 

I will go through that link you posted though however 

 
Fred7777:

But I copied the code straight out of the guy on Youtubes. Why would it work for him and not for me ? 

I will go through that link you posted though however 

May be you should stop copying code from Youtube. If you want to learn you can start with a simple code from this site (CodeBase). There are lots of Experts as examples. Start with something easy. Don't expect you'll find there profitable EA but for study purposes it can be enough.
 

I have had a look at the OrderSend function and I am a complete beginner at writing MQL4 code so I dont know how to use the function in my SAR Script.

Is there anyone that can write it for me so I can insert it into the script ? I only want to get this script working for SAR for now. Once its working I want to test and optimise the different settings which I can do myself.

I wanted to go long and short whenever the price crosses over the relevant SAR.

I am an experienced manual trader but want to automate all my trading now.

But I obviously need to learn everything from scratch in terms of coding.

There are some courses on Youtube I have seen for beginners which I will take. Is there any other courses people can recommend ? Im happy to pay as well.

Alternatively if someone can help me out personally with my coding needs Im happy to pay them as well so I can get this first strategy working.

Thanks.