Hi all. I’m new to this website.
I have been live trading the FSTE100 and some forex pairs for about 6 years now and have been trying to automate my strategies to free up my time. I have found this site very useful to get me up and running. So i wanted to give back a little.
So here is my crude attempt at coding one of my very successful inter-day strategy on the ftse. Most of the code is “borrowed”off you guys in one way or another, and the results are a good bit less than i actually got over this time period when i was trading it real time.
Any help on how to improve the code or the strategy would be much appreciated.
DEFPARAM CumulateOrders = False
DEFPARAM FLATBEFORE = 080000
DEFPARAM FLATAFTER = 210000
atr = AverageTrueRange[12]
// LONG
IF (abs(open-close) > (atr*2) and close < open) THEN
BUY 10 CONTRACTS AT MARKET
SET STOP pLOSS abs(close-open)
SET TARGET pPROFIT abs(close-open)*2.5
ENDIF
//SHORT
IF (abs(open-close) > (atr*2) and close > open) THEN
SELLSHORT 10 CONTRACTS AT MARKET
SET STOP pLOSS abs(close-open)
SET TARGET pPROFIT abs(close-open)*2.5
ENDIF