Translation of EasyLanguage code
Forums › ProRealTime English forum › ProOrder support › Translation of EasyLanguage code
- This topic has 29 replies, 4 voices, and was last updated 6 years ago by
Vonasi.
-
-
07/14/2018 at 8:07 AM #75948
Hi guys!
I like to share a new code with you in ProRealCode, but I cannot translate it from EasyLanguage. It’s a breakout system for shorter timeframes on the Dow, meant to be flexible in inputs and variables, but the main code comes here in a txt-file. Anyone who can help?
Cheers!
07/14/2018 at 9:34 AM #7595207/14/2018 at 8:53 PM #7601607/14/2018 at 9:27 PM #76021Can you offer some practical help as well?
I’m afraid that I have zero knowledge of EasyLanguage but hopefully someone else may be able to help you. It is the summer holiday season so the forums are a little quiet at the moment so you may need to allow a little extra time before finding your answer.
08/15/2018 at 10:37 PM #7832608/16/2018 at 3:11 PM #78392This is the translation into ProOrder code format. Because I have no comparison possible, I don’t know if the results match correctly from the original version, so please be careful with the code..
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354defparam cumulateorders=false//Main Timeframe: 15-minute (EXCHANGE TIME) Second Timeframe: DAILY//{Strategy inputs}//inputs:myFraction=4.7N1higher=10N2higher=16N1main=4EntryCond1long=1 //(0=false ; 1=true)EntryCond2long=1 //(0=false ; 1=true)//{StopLoss}//Input:sl=700if onmarket thenalreadytraded=1endifif intradaybarindex=0 thenalreadytraded=0endif//Point Of InitiationTodaysOpen = DOpen(0)//For the calculation of the spaceATR = AverageTrueRange[40]//The BreakoutLevel (POI + space)myBreakoutLong = TodaysOpen + ( myFraction * ATR )//higher timeframe filter condition (DAILY)EntryCond1long = 0.1 * (Dclose(0) - DHigh(N1higher)) < N2higher//main timeframe filter condition (15 minute)EntryCond2long = dClose(1) - Lowest[N1main](high) < ATR//Position size conditionif dclose(1) < dopen(1) thenvalue1 = 2ElseValue1 = 1endif//Entry Conditionif not onmarket and EntryCond1long and EntryCond2long and not alreadytraded thenbuy value1 contracts at myBreakoutLong stopendif//Exit ConditionIf time = 150000 thensell at marketendif//stopLossset stop ploss (sl)1 user thanked author for this post.
08/20/2018 at 9:15 AM #78627Thank you @Mags67 for finding and @Nicolas for coding … this could be a winner?
I deleted the time exit (Line 49) and added TP to get a quick feel for potential and the results look good!?
Anybody able to add a short strategy (following same logic as Long?) to this code please?
12SET TARGET PPROFIT 90set stop ploss 1301 user thanked author for this post.
08/20/2018 at 9:25 AM #78631Thanks for beta testing every code posted and to give feedback, you always make a valuable work by doing this GraHal!
I feel that the main logic of the strategy was made to long only the DOW. In the original code, it was also meant to be traded on a 15-minute timeframe. Maybe @Mags67 could tell us a bit more about it?
1 user thanked author for this post.
08/20/2018 at 4:14 PM #78662Thank you so much @Nicolas and GraHal for your help!
You are right Nicolas, this system have been trading live with good result on a 15m timeframe and long only. However, a short only version would be great. With your translation above I’ll try to build it myself!
08/20/2018 at 4:35 PM #7866908/20/2018 at 4:45 PM #7867408/20/2018 at 5:48 PM #78678It does say DJI in the .txt file in Mags original post.
I noted the (poor) results at 15 mins and that’s why I went for 5 mins.
I did not change at all any of the variables from Nicolas code apart from TP and SL and getting rid of the exit at 15:00 … as I couldn’t see any logic in exit at 15:00 (21:00 maybe?) but I could have missed some finer point in the code? 🙂
08/20/2018 at 6:53 PM #78679Getting rid of the timed exit is sensible (I think everyone knows my feelings on using time as the reason to exit trade!) bit I fear GraHal that you may just have tuned (curve fitted) your TP and SL to recent market activity. What do the results look like if you adjust them a little each way?
08/20/2018 at 6:59 PM #78680What do the results look like if you adjust them a little each way?
It looked good for values either side of what I chose. Do you (or anybody) have 200k bars you can test on??
I have two versions on Demo Fwd Test with different values for TB and SL … I’ll report back on here how it goes.
Hopefully @Mags67 will be back with a short version by then.
08/20/2018 at 7:08 PM #78681What do the results look like if you adjust them a little each way?
It looked good for plenty of values either side of what I chose.
Do you (or anybody) have 200k bars you can test on??
I have two versions on Demo Fwd Test with different values for TB and SL … I’ll report back on here how it goes.
Hopefully @Mags67 will be back with a short version by then.
-
AuthorPosts
Find exclusive trading pro-tools on