Start trading

Paint candles according to SMA

Created at 19 May 2019
cTrader Reddit
cTrader Discord
MA

marciopereira017

Joined 19.05.2019

Status

Closed


Budget

25.00 USD


Payment Method

Direct Payment

Job Description

Hello,

I would like to create a color code rule that paint the candles according to the rules below. I will paste here a code that I use in the software Profitchart in Brazil so it can be easier to be understood. I would like to use it on cTrader.

Ps.: [1] means the data from the previous period

Start
If (Candle_opening<Candle_closing) and (Candle_closing>Candle_closing[1]) and (Candle_closing>SMA (20)) and (Candle_closing>SMA (40)) and (Candle_closing>SMA (60)) and (SMA (20)>SMA (20)[1]) and (SMA (8)>SMA (8)[1]) then
PaintBar (clGreen)
If (Candle_opening>Candle_closing) and (Candle_closing<Candle_closing[1]) and (Candle_closing<SMA (20)) and (Candle_closing<SMA (40)) and (Candle_closing<SMA (60)) and (SMA (20)<SMA (20)[1]) and (SMA (8)<SMA (8)[1]) then
PaintBar (clRed)
If (Candle_closing>SMA (8)) and (Candle_closing<SMA (20)) and SMA (8)> SMA (8)[1]) then PaintBar (clYellow)
If (Candle_closing<SMA (8)) and (Candle_closing>SMA (20)) and SMA (8)< SMA (8)[1]) then PaintBar (clYellow)
If (Candle_closing>SMA (20)) and (Candle_closing<SMA (40)) then PaintBar (clYellow)
If (Candle_closing<SMA (20)) and (Candle_closing>SMA (40)) then PaintBar (clYellow)
If (Candle_closing>SMA (40)) and (Candle_closing<SMA (60)) then PaintBar (clYellow)
If (Candle_closing<SMA (40)) and (Candle_closing>SMA (60)) then PaintBar (clYellow)
End;

Comments
fundspreader's avatar
fundspreader · 7 years ago

Greetings, please kindly respond to my email at : rony.sitepu@gmail.com