You will need one parameter where you enter your initial balance since you can’t check your account balance with PRT. Then you update this variable after every closed trade with help of the strategyprofit.
odinParticipant
Veteran
here is my code, with reinvestment.
// Festlegen der Code-Parameter
DEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert
capital = 100000 + strategyprofit
n = capital / close
// orginial 200 day sma
c1 = average[40](close)
// the 3 % up band
c2 = c1*1.03
// the 3 % low band
c3 = c1*0.97
// the original 38 day sma
c4 = Average[8](close)
// Bedingungen zum Einstieg in Long-Positionen
IF c4 > c2 THEN
BUY n shares AT MARKET
ENDIF
// Bedingungen zum Ausstieg von Long-Positionen
IF c4 < c3 THEN
SELL AT MARKET
ENDIF
ANDYParticipant
Average
Is it possible to create a screnner when the long conditions of the Trading System or when the indicator conditions?
thank you
ANDYParticipant
Average
It is possible ro create a screnner when the conditions of the Trading Sistem or the indicator ?
thank you