Please help m out

 
I have my ea ready but stuck in last condition.

My ea takes one trade, if it is going in loss i want my ea to take new trade with double lot after 4 candles.

Price must be lower than my previous buy trade.

How to code this scenario
 
Sunny DP: I have my ea ready but stuck in last condition. My ea takes one trade, if it is going in loss i want my ea to take new trade with double lot after 4 candles. Price must be lower than my previous buy trade. How to code this scenario

If your require coding help then show your honest attempt at coding it yourself. Then we can offer assistance.

Reason: