Scalping EURUSD
Forums › ProRealTime English forum › ProOrder support › Scalping EURUSD
- This topic has 32 replies, 7 voices, and was last updated 7 years ago by Ronny.
-
-
04/26/2017 at 8:34 AM #33439
Hi Maz, yes you are right, it’s in yen. I think it has something to do with the ploss stoploss 70.. I have before experianced that the pipsize or pointvalue has sometimes an odd way in yen- even though it shouldn’t matter. I will take a look later.
Cheers Kasper
04/26/2017 at 8:46 AM #33442First, cheers to all of you who have paid interest in my topic!
And thanks a lot Maz for helping me out with turning my beginner coding into something more functional!! I’ll have a look at the changes made and try to play around with it 🙂
I’m sorry Kasper but I have no clue what could be wrong. Luckily I think you got some suggested from Maz with regards to what might be wrong.
04/26/2017 at 9:02 AM #33443@ Kasper on the new version from Maz you need to change the value on stoplossmode which is currently 2.
1stopLossMode = 2 // 1: Static | 2: DynamicI got the same result at you first but when I changed to a higher value I got a positiv result.
04/26/2017 at 9:11 AM #33444Correction -> Try the static stop (1) instead of the dynamic
1 user thanked author for this post.
04/26/2017 at 1:13 PM #33490Here are the results with different kind of stops. I couldn’t get any nice result from an ATR stop. I still haven’t tried a time stop.
04/26/2017 at 5:29 PM #3353504/26/2017 at 5:37 PM #335381SET STOP pLOSS (atr * slATRmultiple) /pointsizeNow it works 🙂
1 user thanked author for this post.
05/04/2017 at 9:09 AM #34492This is the updated version for EURUSD 5M
1123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117Defparam Cumulateorders = falseDefparam Preloadbars = 300//------ Trading hours-------Starttime = 100000Endtime = 240000fridayEndTime = 225000// --------Indicators------blow = Bollingerdown[20]bhigh = Bollingerup[20]MA1 = Average[8]MA2 = Average[200]ad = adx[24]adlevel = 14atr = averageTrueRange[40]slATRmultiple = 5targetATRmultiple = 3stopLossMode = 1 // 1: Static | 2: Dynamic | 3: DONCHIAN STOPDC = 20strailing = 1 // 0=off 1=onstrailingstart = 20isLateFriday = (dayOfWeek = 5 and time >= fridayEndTime)// ------ ENTRY CONDITIONS LONG-----cb1 = (low < blow and close < blow)cb2 = (MA1 > MA2)cb3 = (currenttime > Starttime and currenttime < Endtime)cb4 = (ad > adlevel)c5 = cb1 and cb2 and cb3 and cb4IF NOT Longonmarket and c5 THENBUY 1 CONTRACT AT MARKETENDIF// ------ EXIT CONDITIONS LONG-----cb9 = LONGONMARKET AND ((close > bhigh) OR isLateFriday)IF cb9 Thensell at marketendif// ------ ENTRY CONDITIONS SHORT-----cs1 = (high > bhigh and close > bhigh)cs2 = (MA1 < MA2)cs3 = (currenttime > Starttime and currenttime < Endtime)cs4 = (ad > adlevel)cs6 = cs1 and cs2 and cs3 and cs4IF NOT Shortonmarket and cs6 THENSELLSHORT 1 CONTRACT AT MARKETENDIF// ------ ENTRY CONDITIONS SHORT----cs9 = SHORTONMARKET AND ((close < blow) OR isLateFriday)IF cs9 ThenExitshort at marketendif//------ STOP AND TARGETS -----------if stopLossMode = 1 thenSET STOP pLOSS 65//SET TARGET pPROFIT 30elsif stopLossMode = 2 thenSET STOP pLOSS (atr * slATRmultiple)/pointsizeSET TARGET pPROFIT (atr * targetATRmultiple)/pointsizeelsif stopLossMode = 3 thene= Highest[DC](high)f=Lowest[DC](low)if longonmarket thenlaststop = f[1]endifif shortonmarket thenlaststop = e[1]endifif onmarket thensell at laststop stopexitshort at laststop stopendifendifif strailing = 1 then//trailing stoptrailingstop = strailingstart//resetting variables when no trades are on marketif not onmarket thenMAXPRICE = 0MINPRICE = closepriceexit = 0endif//case SHORT orderif shortonmarket thenMINPRICE = MIN(MINPRICE,close) //saving the MFE of the current tradeif tradeprice(1)-MINPRICE>=trailingstop*pointsize then //if the MFE is higher than the trailingstop thenpriceexit = MINPRICE+trailingstop*pointsize //set the exit price at the MFE + trailing stop price levelendifendif//case LONG orderif longonmarket thenMAXPRICE = MAX(MAXPRICE,close) //saving the MFE of the current tradeif MAXPRICE-tradeprice(1)>=trailingstop*pointsize then //if the MFE is higher than the trailingstop thenpriceexit = MAXPRICE-trailingstop*pointsize //set the exit price at the MFE - trailing stop price levelendifendif//exit on trailing stop price levelsif onmarket and priceexit>0 thenEXITSHORT AT priceexit STOPSELL AT priceexit STOPendifendif12 users thanked author for this post.
05/04/2017 at 9:57 AM #3450005/04/2017 at 10:10 AM #34501Very useful Maz the timezone offset variable
It may be less confusing for everyone if the timezone offset variable is labelled and set at the World Universal Time which is called UTC. (UK is not at GMT in the Summer, but is at BST or GMT+1).
UTC overcomes confusion as it is the accepted World Standard … a Universal Time Clock.
UK is UTC+1
Kasper is UTC+2
Just a suggestion for improvement, but credit goes to you Maz for a great idea … hope others follow your lead.
GraHal
1 user thanked author for this post.
05/04/2017 at 10:18 AM #3450305/04/2017 at 10:29 AM #34505sorry guys but I skipped adding the time zon for EURUSD but it’s more or less a copy past form the USDJPY.
@Maz – do you mean for example having a fixed target combined with an dynamic stop? That I’ve not yet tried.
05/09/2017 at 12:14 PM #3492405/10/2017 at 10:35 AM #35029Thanks for the idea Maz.
I tried the ATR based target to the trailing stop function which showed the best result and it did improve the return. I also tried the an ATR based starting point for the trailing stop but it left the return, win-rate etc unchanged. I’ve attached the latest code.
2 users thanked author for this post.
05/18/2017 at 10:37 AM #35961I tired to make a small monte carlo on the long side for USDJPY and the result looks like attached file.
2 users thanked author for this post.
-
AuthorPosts