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?
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter long positions
indicator1 = BollingerDown[20](close)
c1 = (close CROSSES OVER indicator1)
IF c1 THEN
BUY 2 CONTRACT AT MARKET
ENDIF
// Conditions to exit long positions
indicator2 = Average[20](close)
c2 = (close CROSSES OVER indicator2)
IF c2 THEN
SELL AT MARKET
ENDIF
// Conditions to enter short positions
indicator3 = BollingerUp[20](close)
c3 = (close CROSSES OVER indicator3)
IF c3 THEN
SELLSHORT 2 CONTRACT AT MARKET
ENDIF
// Conditions to exit short positions
indicator4 = Average[20](close)
c4 = (close CROSSES UNDER indicator4)
IF c4 THEN
EXITSHORT AT MARKET
ENDIF
// Stops and targets
//
/
November 2014 to date, I tested. OMX rising sharply in börjag and then get Algon problems, but then make it over 100 percent remaining time to date!
I get -100% after a few trades with your code.
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter long positions
indicator1 = BollingerDown[30](close)
c1 = (close < indicator1)
IF c1 THEN
BUY 2 CONTRACT AT MARKET
ENDIF
// Conditions to exit long positions
indicator2 = Average[40](close)
c2 = (close > indicator2)
IF c2 THEN
SELL AT MARKET
ENDIF
// Conditions to enter short positions
indicator3 = BollingerUp[10](close)
c3 = (close > indicator3)
IF c3 THEN
SELLSHORT 2 CONTRACT AT MARKET
ENDIF
// Conditions to exit short positions
indicator4 = Average[10](close)
c4 = (close < indicator4)
IF c4 THEN
EXITSHORT AT MARKET
ENDIF
// Stops and targets
//
But if I change the code to something like this i get better results.
Hi 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
Barney 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.
Just as it will be for me, too. Do you see the problem in the beginning if you are running in November 2014.
Shit that’s so bad at spelling in English. Run with Google översättning..Hehe
My 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.
Strange Joachim.
Your screenshot did not work by the way!