EURUSD 15 min algo
Forums › ProRealTime English forum › ProOrder support › EURUSD 15 min algo
- This topic has 8 replies, 4 voices, and was last updated 5 years ago by
Nicolas.
-
-
12/26/2019 at 3:06 PM #115470
Found a EURUSD algo which I modified a bit.
It only takes short positions.
EURUSD 15 min Spread=1
Opitmized to 2018
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273// EURUSD 15 minDEFPARAM CUMULATEORDERS = falseDEFPARAM FLATBEFORE = 100000DEFPARAM FLATAFTER = 200000positionsize=1if time=140000 thenlevel=highest[2](low)[1]endif//c1= close < dopen(0)c2= high< dhigh(1)c3= level > dlow(1) and level > dlow(2)c4= (dclose(1)-dopen(1))/dopen(1)*100<0.65ba= average[20](close)dst = STD[20](close)Bu = ba + (2 * dst)c5= ba<ba[1] or high > buif c1 and c2 and c3 and c4 and c5 and time<130000 THENsellshort positionsize contract at marketendifif shortonmarket and time=141500 and positionperf(0)*100<0.3 thenexitshort at marketendif//trailing stoptrailingstop = 30StartTrailingStopValue = 2//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)-close > StartTrailingStopValue*pointsize thenif 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 levelendifendifendif//case LONG orderif longonmarket thenMAXPRICE = MAX(MAXPRICE,close) //saving the MFE of the current tradeif close-tradeprice(1) > StartTrailingStopValue*pointsize thenif 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 levelendifendifendif//exit on trailing stop price levelsif onmarket and priceexit>0 thenEXITSHORT AT priceexit STOPSELL AT priceexit STOPendif1 user thanked author for this post.
12/27/2019 at 12:00 AM #115479Hi Stefan
thanks for posting the code
I only have 100k bars but on my system it looks like the 15 minute outperforms on the first half of the year (no idea why)
I had a look at the 30 Minute chart that has a nice consistent trend, tested at 0.6 points as this is what I trade with on IG.com
Have you checked out the 30 minute timeframe? How does it look with 200k bars?
Thanks
Ruark
12/27/2019 at 9:27 AM #11548412/27/2019 at 10:16 AM #11548612/27/2019 at 11:22 AM #115490Hi Graham
no I didn’t actually thanks for reminding me, with regards to a similar topic of day light savings time. Do you guys tend to use a different system or embed the change of timings for say a US based system?
12/27/2019 at 11:42 AM #115491Do you guys tend to use a different system or embed the change of timings for say a US based system?
I do neither! 🙂
I let the Systems run and they are out of sync by 1 hour for a few weeks until USA and EU align back again to the time difference (UTC -5, UTC +1 etc) when UK was on UTC +1 Summer Time.
Mmm but what if I develop a System in the winter when UK is on UTC+0 … need to think this one out! 🙂
12/27/2019 at 11:53 AM #115492It would be very very useful if each Member had their Timezone / Time Standard (in UTC + or – variance) against their Profile info which shows on each message they post.
I am forever googling Flags then googling what UTC + or – is correct for that Flag etc.
It could be that a lot of folks don’t bother or don’t remember and so they get different performance than the OP shows for their Systems etc??
Would above be a lot of work for you @Nicolas?
I know … I’ll check if there is a Flag to UTC Chart available that I can print out as a handy reference!?
PS Can’t find one … does anybody use anything similar?
What do you do … google the flag then google for the respective UTC variant?? 🙁
12/27/2019 at 12:15 PM #115495Just had another thought … how do we even know what Time Standard a Poster has his / her Platform set at!? They may not even be operating at their native UTC + or – ?
We all need to state / comment at the top of any System posted (Screeners also?) what UTC variance the code is intended for?
I should have posted these last 3 posts as a separate Thread.
Mods
Please could you move my last 3 posts to a separate Thread titled …
Declaring UTC Variance in System Codes
or a better title if you can think of one?
01/06/2020 at 11:07 AM #116013 -
AuthorPosts
Find exclusive trading pro-tools on