I posted an e-mail to NinjaTrader support centre, but I also request all of YOU, if you could possibly help me. I better explained my problem, in the beginning of an email, but you can skip it and start to read just under the "line". Thank you.
Here's that e-mail:
Hello,
I'm student from Europe, and I am working on my thesis ("diploma work" in order to graduate University
about trading on forex. I'm not a trader (yet.. because few months ago I have poor knowledge about trading, but now while working on my thesis I became a big fan of it), I'm using just demo account (I followed the instructions how to connect to the free Real-Time simulation account from http://www.ninjatrader.com/webnew/support_GAIN.htm ..though I need just historical data to do the backtesting). I tried MetaTrader IV and also VisualTrader 2.0, but honestly, I really prefer NinjaTrader, it's absolutely perfect
.. So, what I've done yet, and what I need You to help me with:- so far, I manually backtested two pairs (EUR/USD and GBP/USD) for whole March 2009 with my "strategy" (really quite simple), I wrote results to MS Excel (date, time open/close, long/short, O H L C price.. so everything necessary to make "performance summary" with all the results like from automated bactest).
- so what is my problem? ..I was said, to compare my results (from manual backtests) to those from automated backtests (and then aditionally backtest in program a 12 months back on both pairs). I was looking forward, because I know that NinjaTrader has ability to backtest a strategy. But I was surprised to find out, I am not able to write my "stupid simple" strategy even at Strategy wizard (nor in NinjaScript.. my programming skills are poor).. But I created few "projects" in MS Excell (mentioned above.. and yes I know that to call a work in MS Excell programming is stupid ..and no, by using MS Excel I don't mean MS visual basic for Excel, but just pre-defined functions.. and yes, I know I'm lame.. OK, that was a bit off-topic).. but though, I thought that I have enough logic thinking to write (compose) that my "little" strategy to Strategy wizard, but I failed just at first step - how to define buy/sell signal on MACD.. I probably overestimated myself a bit, and now I have serious problem, because my work need to be done till Monday (20 March)..
- How can You help me? ..I really don't know, but I know, I need to have my strategy written in NinjaTrader (it doesn't matter if it woud be Strategy wizard or NinjaScript) ..but I don't know who could possibly help me (who can I ask for help).. (because I think, it is not your job, to help a dumb "traders" write their strategies to automated backtest.. so I can't request you for it, can I ?) ..I was searching also in forum (at http://www.ninjatrader-support2.com/vb/index.php), but I was unable to find what I needed.. and I really have a lack of time to do a reaserch on google.com about bactesting in NinjaTrader : ( ..
- at the end, what exactly I need to put into that backtest:
----------------------------------------------------------------------------------------------------------------------------------------------------
My strategy is really simple, it's based on MACD and CCI. For MACD I am using periods 6, 13, 4 and for CCI 14.
BUY signals are:
for MACD:
MACD line crossAbove Signal line (also called Trigger.. or in other words the 4 period (in my case) exponential moving average (EMA) of MACD line.. and MACD line is (in my case) EMA 6 - EMA 13 from price chart.. I'm apologizing, because I know you surely knew that.. I wrote that just to be sure)
for CCI:
a) CCI crossAbove -100 line (in other words, if CCI was less than -100 and became more than -100 f.e. -98).
b) CCI crossAbove 0 (zero) line
c) CCI crossAbove +100 line
And analogically, SELL signals are:
for MACD:
MACD line crossBelow Signal line (also called Trigger.. )
for CCI:
a) CCI crossBelow +100 line (in other words, if CCI was more than +100 and became less than +100 f.e. +97).
b) CCI crossBelow 0 (zero) line
c) CCI crossBelow -100 line
That is all
And then strategy itself is:
EntryBuy (or opening Long position) will be, if MACD and (not or) CCI (it doesn't matter whether a) or b) or c) ) give a BUY signal (both MACD and CCI signals doesn't have to be given at the same time, but must be given till 15 minutes, so f.e. if MACD crossAbove Signal line at 9.25, than CCI have to give a signal till 9.40 ..and vice versa, if CCI gave buy signal, f.e. CCI crossAbove -100 line at 13.15, than MACD must give buy signal till 13.30)
Analogiclay, the EntrySell (or opening short position) will be, if MACD and (not or) CCI (it doesn't matter whether a) or b) or c) ) give a SELL signal (...that thing about time is also analogically same as above...)
// So that was about Entry (or Opening positions), to Close position is even more simple:
If I am in Long (I have bought) position, than if ANY Sell signal (from those written above, MACD or CCI a) or b) or c)) occures, than Close.
If I am in Short (I have sold) position, than if ANY Buy signal (from those written above, MACD or CCI a) or b) or c)) occures, than Close.
Note: when I closed (Long/Short) position because of MACD signal (Sell/Buy), I can't open next position (Short/Long) based on that same MACD signal (that I used for Closing previous position), I can open next trade when I get another MACD signal (also supported by CCI signal).. this aditional rule is applied only to closing a position by MACD, it is not applied to closing a position by CCI...... (But if it is too complicated to define this additional rule to backtesting program, I think it wouldn't be a very big problem to not to use it.)
To describe my strategy to last word, just this need to be applicated:
Open (or Close) position at the Close price of candle (or bar, if using bar-chart), in which Open (EntryBuy/Sell) or Close situation occured.
So last example:
CCI crosedAbove 0 (zero) line at 10.10 then MACD line crossAbove Signal line at 10.35 (nothing happens, bcause time between CCI Buy signal and MACD buy signal is more than 15 minutes), then CCI crossAbove +100 line at 10.43 so I open Long position (I will Buy) at 10.45 (so at close price of 10.40 to 10.45 because I am using 5 minutes timeframe). And then, when I get CCI crossBelow +100 line at 13.06 I Close my position (at close price of 13.05 to 13.10 timeframe, so at 13.10). And than let's say that MACD line crossBelow Signal line at 13.19 (so time between CCI Sell signa and MACD Sell signal is less than 15 minutes) it means I will open Short position (I will sell) at 13.20 close price (yes, because trading on 5 minutes timeframe) (and I can open Short position "just after" closing Long position, because I Closed because of CCI and not MACD signal (this is reffering to NOTE about that one additional rule)
So as I mentioned my timeframe is 5 minutes, and my trading time is from 2 am till 10 am EST (or from 7 am till 15 (3 pm) GMT), same for both pairs, GBP/USD and EUR/USD.
When I look back to the top of this email, I am scared, because it is very improbable that anybody reads this email whole to the end. If you did so, I am really glad
..and I would be the happiest person in the world, if you could help me with my problem : )I don't like to ask someone to do me a favor gratuitously, but as a student, I don't have much money. So if you decide to help me, or if anybody help me to write that my strategy into a NinjaTrader backtesting programe, I would mention him / her in my work, and also that part of work would be dedicated to him / her (I would also mention NinjaTrader as perfect tool for baginning traders), and I will also sent to his / hers email a copy of that my complete work in PDF : ) ..probably not fair enough, but I really don't have to offer more yet..
Hope to read some positive reply from you soon.
And thank You once again even just for reading this whole email

Have a nice day

Comment