This little and simple code allows you to draw an indicator, which show you when buy or sell conditions are met.
For “buy” conditions, I did just set :
close > MM200
close > Parabolic SAR
MACD > 0
RSI14 > 50
For “sell” conditions : the opposite.
Of course, you can set what you want, in order to test your strategies.
Of course, to be profitable, you must also set your trading rules (entry, stop loss, trailing stop, take profit, etc.)
It’s only an indicator, which doesn’t show entry or exit rules.
You can test it with a trailing stop, it seems too be profitable !
ACHAT = 0
VENTE = 0
PSAR = SAR[0.02,0.02,0.2]
c1a = close > PSAR
c1v = close < PSAR
MM200 = Average[200](close)
c2a = close > MM200
c2v = close < MM200
IndicMACD = MACD[12,26,9](close)
c3a = (IndicMACD >= 0)
c3v = (IndicMACD <= 0)
RSI14 = RSI[14](close)
c4a = (RSI14 >= 50)
c4v = (RSI14 <= 50)
IF c1a AND c2a AND c3a AND c4a THEN
ACHAT = 1
ENDIF
IF c1v AND c2v and c3v AND c4v THEN
VENTE = -1
ENDIF
RETURN ACHAT as "ACHAT", VENTE as "VENTE"
In order to have the same, you must go to “properties”, and set “achat” and “vente” to histograms (and set the colors green and red), add an horizontal line (value 0).
Happy trading !
You must be logged in to post a comment.
@ Rikke,
Beware of such an indicator. It's just an indicator, not a trading system.
You can fill the indicator with any conditions you want (for sell or buy). If you use this indicator just as a trading system, no doubt it will fail.
You must use it with your own strategy, money management, rules, other indicators, price action, etc.
Regards,
Thank you for all your help - I am sorry for all the messages, but i solved my problems by experimenting with the settings, and i didn't want to waste your time when I had found the solution. Do you think it is possible to make an automatic trading strategy of this indicatior?
I went to this website in the first place because i needed help making another quite simpel trading strategy. But i dont know how to do the coding. Is it something you could help me with? I dont know the prices but i suppose it depends on the difficulty of the code.
Kind regards
Rikke
I think it is working when i set the time for "daily"
Hello,
Don't ask so much questions, I will answer !
You just click "properties", and set to histograms.
Then, you can change the color by clicking on it.
The dotted line is simply the "Parabolic SAR", you have to insert it on your chart.
The indicator is applied for every timeframe. If it disappears on another timeframe, it is because there are no opportunities / criteria.
Don't forget to zoom on data history (for example, set it on 10,000 units of H1 timeframe)
Best regards,
I really like this indicator to work - i think it is good. But i dont know how to code and so on.
sorry and thank you for your help.
and when i change the time from 30min till for exampel 2 hours the "red" part of the histogram disapear?
and the indicator is only aplied for a week or so? Like in a certain interval of time.
Can you explain this?
and the indicator is only aplied for a week or so? Like in a certain interval of time.
Hi again - i found out how to make the histogram - but i don´t know how to get the dottet green/red lines on the chart?
Sorry again - i am new to this.
Sorry yes I do. i don´t know where to set it? I asked the prorealtime support where to find the "properties", but they didn't know.
Thank you
Hello,
You simply set "histogram" to the indicator, and then set color to green or red.
Tell me if you need help ;)
Hola, me gustó mucho este indicador. Pero, a la hora de instalarlo me da error en la línea 4 y 8. En la línea 4 da error en la coma del 0,02 y en la línea 8 el error me lo marca en el ( . Me gustaria saber que puedo hacer para corregirlo. Gracias