Hi,
I’m pretty now in this and need your help with one of my systems. When I do a backtest, the system works fine but now I’ve started it live, it does not make the same trads as in testing. In fact, it makes no trade when it’s live?
This is the code, quite simple I think.
What is wrong?
Big thanks for your help :))
//-------------------------------------------------------------------------
// Main code : MACD cross over
//-------------------------------------------------------------------------
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter long positions
indicator1 = MACDline[12,26,9](close)
c1 = (indicator1 CROSSES OVER 0)
IF c1 THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Conditions to enter short positions
indicator2 = MACDline[12,26,9](close)
c2 = (indicator2 CROSSES UNDER 0)
IF c2 THEN
SELLSHORT 1 CONTRACT AT MARKET
ENDIF
// Stops and targets
SET STOP %LOSS 0.09
SET TARGET %PROFIT 0.36
> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<
Did you include the spread in your test? Did you use tick by tick backtesting? Have you looked at rejected orders list into the platform (CTRL+O)?
Hi Nicolas,
Thanks for your answer. Now I have done a test with tick by tick and suddenly it becomes enormously unprofitable. before it was a okay strategy!
this means that the strategy does not work in reality?
should you always test with tick by tick to be sure that the strategy works?
Bjarke
Spread often does a big diffrens. The world would be beautiful if there wasn´t any spread 😉
You always have sprread in live trading so you should always optimize/backtest with correct spread and tick by tick.
Hi T-rader,
haha yes after testing again with tick by tick, it dos a big diffrenc ;)) That hatred certainly saved me a lot of money 😉
Can i ask you! Have you used this for a long time?
Several of my systems that are running do not make the same trade in real life as when I backtest. Have you experienced the same?