OMX30 trading algo OK
Forums › ProRealTime English forum › ProOrder support › OMX30 trading algo OK
- This topic has 12 replies, 3 voices, and was last updated 7 years ago by Barney.
-
-
02/08/2017 at 7:21 PM #24409
Here is an algo that performs well on one day OMX30. A problem only, the strong uptrend it will be great loss. Is there any good filter that can help me?
1234567891011121314151617181920212223242526272829303132333435363738// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Conditions to enter long positionsindicator1 = BollingerDown[20](close)c1 = (close CROSSES OVER indicator1)IF c1 THENBUY 2 CONTRACT AT MARKETENDIF// Conditions to exit long positionsindicator2 = Average[20](close)c2 = (close CROSSES OVER indicator2)IF c2 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator3 = BollingerUp[20](close)c3 = (close CROSSES OVER indicator3)IF c3 THENSELLSHORT 2 CONTRACT AT MARKETENDIF// Conditions to exit short positionsindicator4 = Average[20](close)c4 = (close CROSSES UNDER indicator4)IF c4 THENEXITSHORT AT MARKETENDIF// Stops and targets///102/08/2017 at 7:25 PM #24411Which time frame?
02/08/2017 at 7:30 PM #2441302/08/2017 at 7:32 PM #2441402/08/2017 at 7:34 PM #24415I get -100% after a few trades with your code.
12345678910111213141516171819202122232425262728293031323334353637// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Conditions to enter long positionsindicator1 = BollingerDown[30](close)c1 = (close < indicator1)IF c1 THENBUY 2 CONTRACT AT MARKETENDIF// Conditions to exit long positionsindicator2 = Average[40](close)c2 = (close > indicator2)IF c2 THENSELL AT MARKETENDIF// Conditions to enter short positionsindicator3 = BollingerUp[10](close)c3 = (close > indicator3)IF c3 THENSELLSHORT 2 CONTRACT AT MARKETENDIF// Conditions to exit short positionsindicator4 = Average[10](close)c4 = (close < indicator4)IF c4 THENEXITSHORT AT MARKETENDIF// Stops and targets//But if I change the code to something like this i get better results.
02/08/2017 at 7:38 PM #24416Hi Barney,
Usually, we ask forum members who forget or don’t know about it to use the “insert prt code” button, but here I would kindly ask you the opposite: please do not press the “insert prt code” button when only writing normal text. For info, the “insert PRT code” is not something applied to 0% or 100% of the message, you can write text without pressing the button, then in the middle of your message press the button if you need to insert some code, and then write your code.
Thanks
02/08/2017 at 7:41 PM #24418Barney I tested your code again and sometimes prt makes strange things when you copy paste code. Here´s a screenshot whit your code compared with my tweaked one.
02/08/2017 at 7:42 PM #2442102/08/2017 at 7:51 PM #2442502/08/2017 at 7:53 PM #24426My apologies, apparently your text style is due to an automatic translator html style, making it look like you pressed “insert PRT code”, but it is possible you didn’t. Then I’d kindly ask you to make lines not too long so that there’s no need for horizontal scroll bar, thanks.
02/08/2017 at 7:55 PM #2442802/08/2017 at 8:07 PM #2442902/08/2017 at 8:10 PM #24432 -
AuthorPosts
Find exclusive trading pro-tools on