EurUsd H1 Simple Profit System
Forums › ProRealTime English forum › ProOrder support › EurUsd H1 Simple Profit System
- This topic has 22 replies, 6 voices, and was last updated 7 years ago by
grimweasel47.
-
-
05/19/2017 at 3:59 PM #3611505/19/2017 at 4:56 PM #3612105/19/2017 at 10:20 PM #36132
Hi @grimweasel47 – I have some time to take a look as promised. Some clarifications please if you wouldn’t mind… Question: When you quote ATR above in your set of rules, are you referring to ATR-hourly or ATR daily? I would assume hourly as your period is 24 – but then could be daily too as that’s roughly a month. Question: With regard to rule #1 – if which candle touches MA? Signal or the following price action? When is it invalidated? What if the 8am doesn’t touch MA, nor break signal tunnel, but 9am does touch MA? To my mind, you actually have 3 seperate systems here. System 1: Breaks of a 7am period tunnel beyond psychological 00 levels, only if somthing touches some kind of MA System 2: Upward breaks of the signal candle if it’s the 24-hour high. Subsequently downward breaks of the signal candle if it’s the 24 hour low System 3: 24-hour tunnel breaks. Is there any reason why these 3 should be put together into one bot? Best, M
Hi Maz
Thanks for this and apologies for the late reply. Work today.
- ATR is 24 period on the H1 chart as you correctly surmised; same as the EMA as this =1 day.
- Wrt Rule 1 – this is the candle 0600-0700 UK time, so closes 1hr prior to LSE/FTSE open at 0800. As an OCO order we place long/short at next .00 levels. Whichever activates first cancels the other leg.
- The orders are left live in the market for 23hrs
- There are 3 possible trades:
- Long/Short OCO if the 6-7 candle touches the 24ema. – 15pips stoploss and 10pip TP
- Long only if price > 24ema, but only above the highest high of past 24 hrs (sometimes the signal candle IS that high!) – 1xATR SL and 2xATR TP (changed from 1.5TP)
- Short only if price <24ema, but only below the lowest low of past 24hrs (sometimes the signal candle IS that low!) – 1xATR SL and 2xATR TP (changed from 1.5TP)
Please let me know if you need further clarification and thanks VM for the help; much appreciated.
07/18/2017 at 2:44 PM #40983Hi Maz,
Did you manage to look at the code above? I’m trying to automate this strategy as work means I am missing some trades which is affecting overall system profitability.
Since the post above I have made a couple of changes that now yield better results:
- MA has changed to 50ema
- OCO order – both legs have 6 pip SL and 9 pips limit order (take profit)
- Changed ATR TP for ‘trend’ trade (ie non-OCO) to 1.5xATR
The system also works with above rules on EURJPY but when traded at 0800 UK time (so using high/low of 0700-0800 candle and associated next .00 levels above and below).
Any help appreciated.
09/26/2017 at 9:28 AM #47348I’m still having issues with this code on Igindex. I have adapted the strategy to trade GBPUSD on the close of the 0600-0700 candle (activationtime=070000)
The first part of my code sets the indicators. The strategy uses emas to determine the trend and then sets orders relative to the candle close above.
1234567891011121314// --- indicatorsema = exponentialaverage[30](close)ema2 = exponentialaverage[20](close)ema3 = exponentialaverage[10](close)EMAabove = ema2>emaEMAbelow = ema2<ema//change = ROC(exponentialaverage[a](close))atr = averagetruerange[24]hh = highest[3](high)ll = lowest[3](low)Filter = ema2-ema2[1]Filter2 = ema3-ema3[1]Long = Filter >0 and emaabove and filter2 <1.2 //and Filter2 <60Short = Filter <0 and emabelow and Filter2 >-1.2 //and Filter2 >-60As you can see the trend element should only open a trade above/below the highest high or lowest low from the previous 3 H1 bars.
The pending orders part is given below where Case2 is long and Case 3 is short:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849//case 2 : If price is above the MA then only trade long BUT only above the highest high of the past 3 hrsif close>ema and long and case = 0 thencase = 2levelhi = hh[1]endif//case 3 : If price is below the MA then only trade short BUT only below the lowest low of the past 3 hrsif close<ema and short and case = 0 thencase = 3levello = ll[1]endifendifif alreadytraded = 0 then//money managementif case=1 thenStopLoss = 0.9*ATRelseStopLoss = 0.9*atrendifRisk = riskpercent/100//calculate contractsequity = balance + StrategyProfitmaxrisk = round(equity*Risk)size = max(minlot,abs(round((maxrisk/StopLoss)/PointValue)*pipsize))//in all cases put pending orders on marketwhile case <> 0 and time <=LimitHour and daytrading=1 doif levelhi>0 thenbuy size contract at levelhi stopendifif levello>0 thensellshort size contract at levello stopendifwendendif//set target and profitif onmarket thenif case = 1 thenset target profit 1.1*ATRset stop ploss StopLossendifif case = 2 or case = 3 thenset target profit 2.1*ATRset stop loss StopLossendifendifcurrentprofit = strategyprofitThe problem is that on the IgIndex feed this morning the trade activated at 070000 but NOT below the low (wick) of the previous candle (which was the lowest low of the previous 3hrs, highlighted in chart below) but at exactly the close price of the previous bar, which is incorrect as per the code above?
My question is, is this en error in the above code, or an issue with PRT on IgIndex?
Help appreciated as very frustrating.
09/26/2017 at 9:58 AM #4736812345678910111213141516171819202122232425USDCADdefparam cumulateorders=false// --- settingsbalance = 10000 //balance of the strategy when activated the first timeminlot = 1 //minimum lot size for the current instrument (example: 1 for DAX)riskpercent = 2 //risk percent per tradeactivationtime = 100000 //Close time of the candle to activate the strategyLimitHour = 170000 //limit timeif dayofweek=1 then //Mondaydaytrading=0endifif dayofweek=2 then // Tuesdaydaytrading=1endifif dayofweek=3 then // Wednesdaydaytrading=1endifif dayofweek=4 then //Thursdaydaytrading=0endifif dayofweek=5 then // Fridaydaytrading=1endif// ---Again. USDCAD. Activationtime=100000. Yet this morning at 00:00 11secs the system activated a trade when the trade time should be on the close of the 0900-1000 candle? Any ideas or help greatly appreciated!
123456789101112131415161718192021222324if intradaybarindex=0 thenalreadytraded = 0case = 0levelhi = 0levello = 0endifif onmarket or (onmarket[1] and not onmarket) or (currentprofit<>strategyprofit) thenalreadytraded = 1endifif time=activationtime then// case 1 : If price candle touches MA (even wicks) then look at high or low of signal candleif high>ema and low<ema thencase = 1levelhi = CALL"#floor and ceil"[high,10.0,1]levello = CALL"#floor and ceil"[low,10.0,-1]endif//case 2 : If price is above the MA then only trade long BUT only above the highest high of the past 24 hrsif close>ema and long and case = 0 thencase = 2levelhi = hh[1]endif09/26/2017 at 9:50 PM #4743909/27/2017 at 12:12 AM #47446Nicolas- any ideas on this? Again tonight two trades have activated at 00:00hrs on the IGindex platform when they shouldn’t have as activationtime=060000?? Why is it activating trades at 0000hrs all the time? Thanks.
Despair – thanks for the reply but as I had Nicolas code this for a £fee for me I didn’t want to post the entire code!
-
AuthorPosts
Find exclusive trading pro-tools on