Pleasr give me the code for the following LWMA crossovers.

 

I have been trying to code my first EA for sometime now. I have come close but i havent really made it to my liking. Can someone please

direct me on how the following RA code would look like.


Open Buy when LMA_1 crosses above LMA_2

Close that position when LMA_2 comes below LMA_1

Open Sell when LMA_2 crosses below LMA_1

Close the short position when LMA_1 crosses above LMA_2.

No TP,TS or SL.

All profits and losses will be decided by open and close prices.

Reason: