The problem is that this indicator repaints and see the future bars, if it were real it would be the holy grail that works with all assets.
See what the real code would look like in pinescript (lookahead disabled):
//@version=3 strategy("Goldscalping", overlay=true) tim=input('160') out1 = security(tickerid, tim, open) out2 = security(tickerid, tim, close) plot(out1,color=red) plot(out2,color=green) longCondition = crossover(security(tickerid, tim, close, lookahead=barmerge.lookahead_off),security(tickerid, tim, open)) if (longCondition) strategy.entry("long", strategy.long) shortCondition = crossunder(security(tickerid, tim, close, lookahead=barmerge.lookahead_off),security(tickerid, tim, open)) if (shortCondition) strategy.entry("short", strategy.short)
Using the same period for both moving averages, and given that the open price is most often almost the same as the close price of the previous bar, you are essentially just using one moving average and simply detecting its slope, whether up or down.
Using the same period for both moving averages, and given that the open price is most often almost the same as the close price of the previous bar, you are essentially just using one moving average and simply detecting its slope, whether up or down.
Yes, but I just translate the logic of this indicator
And it works since it is crossover (open[0]>close[0] && open[1]<close[1]) but it is not profitable.
Yes, but I just translate the logic of this indicator
And it works since it is crossover (open[0]>close[0] && open[1]<close[1]) but it is not profitable.
SL would be work with fractal : it means lowest fractal in 5M could be SL ( also can set it as 15 min but i have tested 5 min SL is better ) for TP : there is two way : first one highest pervious fractal pivot and second one trailing profit with highest high
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello ,
Below you can find my scrip that i have backe tested in gold with more than 90% win rate . please help me to make EA ( MT4) .
Pine scrip :