Probacktest Prorealtime All Time High

arrocal

Newbie
2 0
Hello;

I am trying to create a backtesting of an strategy whith Probuilder\Prorealtime, when a stock breaks its all time high, in month time frame. I've tried this code [1] but I think that it is incorrect.

Otherwise, i have created a indicator that return the all time high of each candlestick, and in this case I think tha it works well:


Count = 1
FOR i = 1 TO BarIndex DO
MaxPoint = Highest[Count ](High)
Count = Count + 1
NEXT
RETURN MaxPoint

Any suggestions?

A lot of thanks

[1]
DEFPARAM CumulateOrders = False // Acumulación de posiciones desactivada
Contador = 1
FOR i = 1 TO BarIndex DO
PuntoMaximo = Highest[Contador](High)
Contador = Contador + 1
BUY AT Highest[PuntoMaximo](High) + 0.1 STOP
NEXT
// Condiciones de salida de posiciones largas
indicator3 = WeightedAverage[20](close)
c2 = (indicator3 CROSSES OVER high)
IF c2 THEN
SELL AT MARKET TOMORROWOPEN
ENDIF
 
 
AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock