Heikin Ashi Smooth
Forums › ProRealTime English forum › ProOrder support › Heikin Ashi Smooth
- This topic has 5 replies, 2 voices, and was last updated 5 years ago by
robertogozzi.
-
-
09/19/2020 at 5:51 PM #144777
I use the Heikin Ashi Smooth as a moving average and want to incorporate it into a system.
I want to code buy and sell signals based on the Heikin Ashi smooth.
Buy when first green Heikin Ashi smooth appears and closes, after a succession of red Heikin Ashi smooth.
This to be irrespective of where price action candles are on the chart.
I will concentrate on the buy side and then move onto developing the sell side.
Attached is a screen shot of the red Heikin Ashi eventually closing green……..the setting price in the back ground is Line + points.
Any guidance on this first element would be very helpful.
Many thanks
09/19/2020 at 6:03 PM #14477909/20/2020 at 2:39 PM #144806Ok I had a crack at the code using the simplified method of creating code……….
Its telling me there is a syntax error in line 6 (as that has an exclamation mark in an orange triangle – LOL)
Just trying to get it started in the first instance i.e. buy when Heikin Ashi Smooth candle turns green after a red candle………..although I only could think that you would have to state that the Heikin Ashi smooth indicator relevant
candle would close above the open as I dont think you can program colour changes? is that correct?
Any guidance would be a great help.
Thanks.
Heikin Ashi Smooth Indicator1234567891011121314151617181920// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Conditions to enter long positionsc1 = CALL "Heikin_Candle_smoothed"[21, 5, -2, 21, 0]> CALL "Heikin_Candle_smoothed"[21, 5, -2, 21, 0][1]IF c1 THENBUY 1 PERPOINT AT MARKETENDIF// Conditions to exit long positionsc2 = (CALL "Heikin_Candle_smoothed"[21, 5, -2, 21, 0]< CALL "Heikin_Candle_smoothed"[21, 5, -2, 21, 0][1])IF c2 THENSELL 1 PERPOINT AT MARKETENDIF09/20/2020 at 2:53 PM #144807Lines 6 and 15 have more than one error each:
- remove the initial “>”
- use a variable to assign the returned value of the CALL.
09/20/2020 at 2:57 PM #14480809/20/2020 at 4:03 PM #144809Because CALL returns a value and that value has to be stored somewhere, like in lines 5 and 14, so that you can compare them.
You cannot use “>” to compare 2 different CALL and it cannot be written in separate lines.
-
AuthorPosts
