how to create trend line based on moving averege indicator

 

trendline

hello, i need help. i want to create expert advisor based on ma trendline cross so please help me. i can program experts in mql4 but i stuck on this part of code. so if anyone can code it please help me.

 
Revazi Tchitanava:

hello, i need help. i want to create expert advisor based on ma trendline cross so please help me. i can program experts in mql4 but i stuck on this part of code. so if anyone can code it please help me.

You need to look for linear regression in the codebase.
 

i read linear regression topic in codebase and also i have wrote ea based on it but i dont understand how it can help me. if you could please help me with code

Reason: