Random 1min EURUSD ScalperView all attachments
- 18 - Random-Scalper-28s-AUDUSD-v1.2.itf
- 17 - Random-Scalper-28s-AUDUSD-v1.1-13-02-0934-Compare-ProOrder.jpg
- 16 - Random-Scalper-28s-AUDUSD-v1.1-12-02-0934-ProOrder.jpg
- 15 - Screen-Shot-2018-02-12-at-05.53.34.png
- 14 - Random-Scalper-28s-AUDUSD-v1.1.itf
- 13 - Random-Scalper-28s-AUDUSD-v1.1.jpg
- 12 - Screen-Shot-2018-02-10-at-21.41.56.png
- 11 - Screen-Shot-2018-02-10-at-12.27.16.png
- 10 - Random-Scalper-22s-AUDUSD-v1.0.itf
- 9 - Random-Scalper-18s-EURUSD-v1.0.itf
- 8 - Screen-Shot-2018-02-10-at-06.57.03.png
- 7 - Skärmklipp20.png
- 6 - eurusd-automatic-trading.png
- 5 - AUDUSD.png
- 4 - 1min-eurusd-trading-strategy.png
- 3 - EURUSD-1-minute.png
- 2 - Random-1min-Scalper.itf
- 1 - random-min-scalper-1517820082lcp84.png
02/05/2018 at 1:37 PM #61531
This scalping strategy is based on the concept of following a coin flip randomized approach to picking market direction and then simply managing the trade according to a Risk:Reward ratio of 1:2. The strategy also has equity curve management built-in to help optimize performance.
The direction of the trade is randomly determined based on the fact that at any given point the direction of a candle will be either be red or green. The algorithm used will pick an historic candle between 1 and 5 bars back and use this as a binary coin flip to determine direction.
Stoploss distance is determined dynamically through the use of a smoothed ATR and Take Profit is simply twice the Stoploss distance.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758DEFPARAM CUMULATEORDERS = FALSECurvePeriod = 90Type = 0Capital = 10000Equity = Capital + StrategyProfitEquityCurve = Average[CurvePeriod,Type](Equity)If hour >= 9 and hour <= 22 Thenpossize = 1Elsepossize = 0If longonmarket ThenSell at marketElsIf shortonmarket ThenExitshort at marketEndIfEndIfonce RX = 1once SV = 1If RX > 5 ThenIf SV > 5 ThenSV = 2EndIfRX = RX-SVIf RX <=0 ThenSV = 2EndIfElseRX = RX + 2SV = SV + 1EndIfonce dir = 0If dir = 0 and close[RX] > open[RX] Thendir = 1ElsIf dir = 1 and close[RX] < open[RX] Thendir = 0EndIf//GRAPH RX coloured(255,0,0) AS "RX"//GRAPH SV coloured(255,0,255) AS "SV"//GRAPH DIR AS "DIR"If countofposition = 0 and (barindex < curveperiod or (barindex > curveperiod and equity >= equitycurve)) and dir = 0 ThenBuy possize contract at marketElsIf countofposition = 0 and (barindex < curveperiod or (barindex > curveperiod and equity >= equitycurve)) and dir = 1 ThenSellshort possize contract at marketEndIfSL = ((average(range)+1.2*STD(range))*100000)SET STOP pLOSS SL*possizeSET TARGET pPROFIT SL*2*possize
1 user thanked author for this post.02/05/2018 at 1:42 PM #61553
Thank you Juanj, interesting concept 🙂 I move your post submission from the Library to the forum, because I’m not able to replicate the same interesting result on my side. Do you know why?02/05/2018 at 1:50 PM #61556
Hi Nicolas, maybe it is the way prices are quoted on your system.
Change the multiplication factor on line 55, start removing zeros until you get the same result as me.
SL = ((average(range)+1.2*STD(range))*100000)02/06/2018 at 5:59 AM #61623
@nicolas or it could be due to our time zone difference, so you can try changing line 10 to:
If hour >= 8 and hour <= 21 Then
But can’t think it would have such large effect. The strategy if adjusted for timezone differences is profitable on multiple markets that I have tested.02/06/2018 at 6:59 AM #61627
This concept interesting, what is your opinions about: trend is your friend, follow the SMA200 , bla bla Bla?
can you please post a pic of the values RX and SV, why you are saying is random? Looks pretty deterministic for me.
In your fuction for ATR, you can use the function “pipsize”
Cheers02/06/2018 at 8:02 AM #61632
Better, but still not as good as your own test.. with or without spread.. I don’t understand why. Do anybody get the same result as juanj?
Did you test the code? You can decomment lines 45 and 46 to get the RX and SV values on your own screen 🙂02/06/2018 at 11:25 AM #61662
@leo, yes I do believe trading with the 200SMA is a good idea athough for this specific strategy I did not want to add a trend bias. I consider the trade direction random, because if you GRAPH DIR you will not see any recognizable pattern.
@nicolas, I cannot understand your result. I tested with a spread of 0.8, maybe see if that makes the difference.
Attached is the exact same algorithm on the AUDUSD tested with a spread of 1 and trading time of 2-19 (GMT), you need to adjust for GMT+102/06/2018 at 1:51 PM #6168602/06/2018 at 2:00 PM #6169102/06/2018 at 2:01 PM #61694
I realize now that because the direction is technically random the result will never be exactly the same as the starting point is always different.
Yet the results should still not differ much. Will back test in my demo account to see if there is a difference.02/06/2018 at 6:52 PM #6176402/09/2018 at 2:13 PM #62125
I am not at home at the moment, but I still thinking in your concept @juanj. Many authors can be agreed that invest in finantial markets is like flipping a coin.
Therefore, try the same with some bias or another conditions,
-momentum Like: ” close[RX] > Close”
– a filter like for entry long, price should be avobe a parabolic SAR.
Did you try another reward ratio like 1.5 or 3 ?
Cheers02/10/2018 at 6:59 AM #6218202/10/2018 at 9:56 AM #62184
I tried several things but still not being profitable.
I tried: parabolic SAR and momentum and pending ordes
Hope you get some other ideas1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071DEFPARAM CUMULATEORDERS = FALSEDEFPARAM PreLoadBars = 10000possize=1once RX = 1once SV = 1If RX > 5 ThenIf SV > 5 ThenSV = 2EndIfRX = RX-SVIf RX <=0 ThenSV = 2EndIfElseRX = RX + 2SV = SV + 1EndIfdir = 0if not onmarket and hour >= 7 and hour <= 21 thenIf close[RX] > open[RX] Thendir = 1ELSEdir = -1EndIfENDIF//GRAPH RX coloured(255,0,0) AS "RX"//GRAPH SV coloured(255,0,255) AS "SV"//GRAPH DIR AS "DIR"SL = average(range)+2*STD(range)SL = SL/pipsizeMySAR= SAR[0.02,0.02,0.2]If not longonmarket and dir = 1 and close > mySAR and close>close[RX] ThenBuy possize contract at high+2*pipsize stopSET STOP pLOSS SLSET TARGET pPROFIT 3*SLENDIFIf not shortonmarket and dir = -1 and close <mySAR and close<close[RX] ThenSellshort possize contract at low-2*pipsize stopSET STOP pLOSS SLSET TARGET pPROFIT 3*SLEndIfIf longonmarket Thenif hour <= 7 or hour >= 22 ThenSell at marketENDIFIf close crosses under mySAR thenSell at marketENDIFENDIFIf shortonmarket Thenif hour <= 7 or hour >= 22 ThenExitshort at marketEndIfIf close crosses over mySAR thenSell at marketENDIFEndIf02/10/2018 at 10:09 AM #62185
I just studied this strategy whose concept is very interesting.
However, it is not profitable such as with a TF 1min on a full day.
So I set up a trading limit and go out every day with a gain.
To optimize the number of trades per day, I’m spending on an 18s TF.
The results are positive over a period of 20,000 units (impossible to go beyond, with a TF of 18s there is no more history)
I give you my version below. I look forward to your comments.