Hi all.
I have built a simply scalping strategy that works pretty well (have been live trading for around 6 months.) It works of the 1 and 5 minute charts and does really well on the GBPUSD, AUDUSD AND EURUSD (does work well on any yen pair). Now the strategy risks 20 pips to make a profit of 4 but is highly, highly consistent. That being said, I am a terrible coder so I thought I would throw it out to the community to discuss how we can best optimise the risk to reward ratio. I also think it would be great if anyone knows how to hedge a losing position at say 10 pips down then when another buy is triggered remove the hedge and add an additional position. I also need it to kill positions for me a couple of hours before NY closes on Friday and not open until 4 hours after the market opens in the Asian session on Monday. I am open to any thoughts at all to be honest so if you have one, please lets open some discussion.
Below is the indicator first, then the code. I would be really interested to hear what people think
Indicator
REM Calculation of Bollinger oscillator
delta = CLOSE - BOLLINGERDOWN
width = 4.7 * STD
BBO = delta * 100 / width
RETURN BBO AS"Bollinger Band Oscillator"
Script
// Definition of code parameters
DEFPARAM CumulateOrders = True // Cumulating positions deactivated
// Conditions to enter long positions
indicator1 = CALL bolcam(close)
c1 = (indicator1 < 0)
indicator2 = RSI[13](close)
c2 = (indicator2 < 25)
indicator3 = RSI[13](close)
indicator4 = BollingerDown[20](RSI[13](close))
c3 = (indicator3 < indicator4[1])
indicator5 = RSI[13](close)
indicator6 = BollingerDown[20](RSI[13](close))
c4 = (indicator5 CROSSES OVER indicator6)
IF c1 AND c2 AND c3 AND c4 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Stops and targets
SET STOP pLOSS 20
SET TARGET pPROFIT 4
on eurusd 5 min and 1 min gives me loss with 100K bars
Sorry I mist this in the first post. Please name the indicator bolcam. If it’s not mentioned the script ignores it which may be the diff in results 👍
If the “bolcam” indicator wasn’t already in Francesco’s platform, he wouldn’t have tested successfully the strategy, so I presume he has imported it.
Did you include spread in your backtests Cameron? (haven’t test it myself, that’s why I’m asking you).
Exactly Nicolas, Cameron, would you mind to send a picture of your results? did you remember to click “backtest in tick by tick mode”?
Thanks!
Hi all. Yes I had a spread of 1 pip for eudusd (i will send results on Monday) across all pairs. Have a great weekend
Hi all. As requested, backtests on 100,000 units. Spread built in. I am showing a 100% hit rate across the 3 markets. Cheers Cam
And these are the 1 minute tests which dropped one trade but the others where pretty good (also 100,000 bars with spreads)
Hi Francesco. I was wondering if you had a chance to see my results? May I ask what you are getting? I see you have the ability to test for longer so would be really keen to get your thoughts. Regards Cameron
hi Cameron, apologies I am travelling today, will try to have a look this evening
No apologies needed sir. I very much appreciate your feedback. I know my limitations when it comes to coding so thanks for having a look 👍👍
Hello Cameron, your results are ok, but they consider only a very short period of time, I think only 10k bars, for this reason they dont look statistically significant.
YOur strategy is interesting but you should I think make it work on 100k bars.
Thanks
Francesco
it gives me a 94% strike.
Sounds logic since you are averaging down if the price continue to fell. The stoploss is fine, but you need at least 4 trades to stay flat after only 1 loosing order. Francesco is right, you should test it on a longer period. Good luck 🙂
Thanks gentlemen. I appreciate it. A quick question, I use IG from Australia so have limited data to test with. May I ask, what do you think the best way to have a system tested is ? Are there people I can pay to do it or should I purchase a full license with PRT direct. I have been trading it live for around 6 months and it gives me similar results to my test but I would sleep easier with some longer and more robust testing.
Also, the strat doesn’t average down. It just does a straight 20-4. I was wondering if averaging down would improve it but I struggle with some of the code.
Thanks again 🙂