Make coding

 
Can anyone help me? I want to create code using a Moving Average that compares the closing price of each candle. Example: Buy if the closing price of candle 0 increases x% from the closing price of candle 1, and Sell if the closing price of candle 0 decreases x% from candle 1.
 
if I don't understand what you want to do with moving average if you only want to calculate rate of change
 
Luandre Ezra #:
if I don't understand what you want to do with moving average if you only want to calculate rate of change

OP clearly said Buy if... so they are not just calculating the rate of change

 
JONI Spd:
Can anyone help me? I want to create code using a Moving Average that compares the closing price of each candle. Example: Buy if the closing price of candle 0 increases x% from the closing price of candle 1, and Sell if the closing price of candle 0 decreases x% from candle 1.

You can:

1. Learn how to code

2. Hire a job in freelancer 

3. Or wait and hope someone helps you to build it from scratch although very rare.

If you show us an

 

I clearly understand what question that OP meaning. To do that OP need to find the rate of change between current bar and last bar, if it's exceeding X value than open BUY. He needs to calculate the rate of change first before he can open a position.

And also my question is why he needs moving average to calculate something that isn't related to moving average.