No something is wrong
I tried -
Close > REF(EMA(High,50),2) AND LAST > REF(HIGH,1)
As well as this -
REF(Close,1) > REF(EMA(High,50),2) AND LAST > REF(HIGH,1)
But still Error message is getting generated
I am sorry. I have mis communicated.
Code suggested by you is generating report; but I want to enter trade only if high of reference candle is taken out which is not happening in code suggested by you. So I tried other codes specified by me; and which are giving error.
Pi chart gives following reply upon applying code for back testing
"Your Script generated an error"
"Error:Script generated no trades"
It does not specify area of error in the code
Thanks for feedback.
as per your code, i tried for icici-eq, 1 minute chart., gives backtest results
Buy- Close > REF(EMA(High,50),2) AND LAST > REF(HIGH,1)
Sell- Close < REF(EMA(LOW,50),2) AND LAST < REF(LOW,1)
Buy Exit- 0
Sell EXit- 0
Make sure you are keying in values in all the boxes.
Yes it is generating signals but entry arrow is shown at reference / trigger candle i.e. when candle close is above EMA but not at the candle which exceeds High / Low of the reference candle.
Thanks again.
Hi,
Please try this -
Buy: LAST > REF(HIGH,1) AND REF(CLOSE,1) > REF(EMA(HIGH,50),2)
Sell: LAST < REF(LOW,1) AND REF(CLOSE,1) < REF(EMA(LOW,50),2)
Now entry arrow is shown correctly.
However few minor problems needs to be solved -
Entry and exit prices considered in back testing are closing prices of entry bar and not High / Low exceeding point of previous bar.
If entry bar’s closing price is beyond reference bar closing it is considering that bar as entry bar; and not when it breaches High / Low of previous bar and closes not exceeding closing price of previous bar.
Please advise if you have got any resolution for above cited issues.
Thank you Andrewman for giving me correct thinking direction.