Dear Apprentice,
Few Observations:
1) Close Trade: Sometimes trades closes immediately after opening - see picture below:
As you can see Long Trade Opened and Closed on 25.01.2018 @ 20:00. Trade should have closed on 29.01.2018 @ 04:00. This I think is due to the way change in SAR is checked:
--1) SAR Down changes to SAR Up
return SAR.DATA[period] > source.close[period];
This statement just checks if SAR is above the Close value - it does not check the change from Down to Up - which should be the correct way.
Can you please arrange to correct it.
2) Open Trade: If I use "End of Turn" Option for "Entry Execution Type", then trades are being opened one candle later than expected (two candles after the entry conditions are satisfied) - see picture below - Red Lines are where trades are being opened - Green Lines are where trades should have opened:
If I use "Live" Option for "Entry Execution Type", then sometimes entry conditions are getting satisfied when the candle is still not closed - but then candle closes below (for long trades) and above (for short trades) making the entry a wrong entry.
I think "End of Turn" is what I am looking for - but Trades are being Opened one candle later which most of the time costs pips. How to avoid this? Can you correct this?
Any help / suggestions will be very much appreciated. Others functions appears to work correctly - will continue to test.
Thanks and Regards,
S. Joseph