TradingView
mattehalen
6 Jun 2020 pukul 11.43

[Strategy] - EMA 10,20 59 with Profit Displayed 

Euro Fx/Australian DollarFXCM

Huraian

This EA is still under construction !!


So for this EA is only based on the trend of the 3 EMA's
Buytrend = (ema1 and ema2 > ema3) and (ema1[1] and ema2[1] > ema3[1])


We also change the Background depending on the trend.
bgcolor(Buytrend ? color.green : color.red,transp=70)

At this point I was wondering how much "profit" we would have made if this strategy was only based on the trend so I added the Labels to start/end close of that trend and then see how much profit in pip's we would have made.

Later I was wondering if I could get the total information on the trades and thats what the Label over the current candle is telling us. If that label is red we didn't made any profit and if its green we made som profit.
I also added a BuyProfit and a count buy/sells and a total Profit to see how that information clearly without opening the strategy tester.
NOTE this shows the profit in pip's

Next step is to implement a Buy/Sell Signal togheter with a Buy/SellSignalOUT signal.
Thats currently under development and you'll see some code being there already but as of now the orders are made from the trend signal not the Buy/Sell Signal.
Komen
mattehalen
I see i posted it with the wrong timeframe.

Works so far best on:
FX:EURAUD - 15mn and 30
FX:EURUSD - 30min and 1h
XAUUSD - 30min and W
CUBYC
@mattehalen, Mate this is really great script for the idea where you are displaying the profit, really helps, but counting the trades is not working really good, buy and sell showing same number
mattehalen
@CUBYC, I think the script is working as it should at the moment. The buy/sell count will be the same or one of because of how it's set up.
This strategy make a buytrade and the buySTOP and Sell Start is at the samebar or one bar off. This is way after a Buy there will be a sell. and after a sell it will be a buy. This makes the buy sell count always be the same or one off.

This is the first strategy i use this profit display on and it wont be the last but for this specific script as I see it it works as it supost too.
I'm happy to try and use it in other script if the script is DM'd to me.
Lebih