@fxamoneymaker Okay, if I understand you right, you want to trade the body of the prvious candle, where entry is 50 pips above / below the candle close and you want to exit 50 pips before previous candle close. Right?
Furthermore if previous candle was a bear candle, you make a Buy trade. If it was a Bull candle, you do a Sell trade. Still right?
Minimum candle size would be in your example 100 Pips + some minimum profit. Still everything right?
If so, those would be the steps to do ..
- Get body size of candle ID1
- Check body size of candle ID1 > than 100 Pips (Plus some minmum profit maybe)
For Buys:
3.a) Check if Candle ID1 was a Bear candle
3.b) Calculate entry price leven (candle close ID1 + 50 Pips)
3.c) Calculate take profit level (candle open ID1 - 50 Pips)
3.d) Place pending order or wait until price is at entry level
For Sells:
4.a) Check if Candle ID1 was a Bull candle
4.b) Calculate entry price leven (candle close ID1 - 50 Pips)
4.c) Calculate take profit level (candle open ID1 + 50 Pips)
4.d) Place pending order or wait until price is at entry level
Did I forget something? SL maybe, but you didn't mention what that should be.