İş tamamlandı
İş Gereklilikleri
Hello,
I am a long time user of Tradestation (TS) and EasyLanguage (EL) and have been trading my own automated futures strategies. Looking into trading Forex (not available through TS, although it has the historical datas to test) with MT4 (already have MT4 accounts with brokers).
I have created a strategy in EL that I am not MQL4 litterate enough to code.
My EL code will be integrally available to translate into an EA in MT4. But decribing the strategy and going by steps, you should not need to be EL litterate.
The strategy basics:
* Martingale (yeah, i know...)
* will trade long side and short side on two differents charts and will not have to talk to each other
* Trade multiple pairs (between 4 and 8) at the same time. 1 hour TF. No other EA running on same pair but magic number would still be needed just in case.
* will trade @market at end of a bar (if conditions are met), so basically @open of next bar
* conditions very straight forward (if C - C[1] >= "gap" {input} then sell @ market, reverse for buy side) for first entry after take profit or stop previously reached. Then, if first entry done, add to the position every time a bar closes "gap" down from the previous entry price (for longs) ie averaging down (yeah I know again...). Reverse the process for shorts.
* will of course pyramid into positions (multiple of previous entry #lots, no number of entries limit, number of total lots as an input) and exit all position at a take profit limit order
* average entry price for the whole position will be #lots affected of course, as lots increase every new position taken in the same initial position
* will have a stop loss (position based, $) based on pair traded, and a take profit "target" {input} from the VWAP of the whole position.
* will have a portfolio stop
* If target or stop hit, then restart to point 5 above.
Inputs that have to be tested/changed will be:
gap(pips), target(pips), stop($), start#lot(ex: 0.10),fact#lot(ex: 1.50), mart(0 or 1); portfstop(xx% of portfolio value with open positions P&L)
"mart" is a number that is used to test/trade which increase in the number of lots we use:
if mart = 0 then {add to previous position #lots} #lotsposition2 = #lotsposition1 + fact#lot
if mart = 1 then {multiply from previous position #lots} #lotsposition2 = #lotsposition1 x fact#lot
I attach a snap of a EURCHF chart with the system positions. "1000 lots" in TS means 0.01 lots in MT4.
Optionnaly, I'd like to have a code for an indicator that shows on a chart the average price of a position (white dots on my chart) and its target price (blue dots on my chart).
I hope I have explained simply and clearly the concepts. Of course, as said, my working EL code will be available. And we will have to clear out together all misunderstandings concerning the startegy behaviour before you start coding so you will not have to get back to previous code that would need re-writing to cater for misunderstandings or new features from my side. Been there, done that ;-)
Thank you for reading. Hope to work together.