Skip to main content

afl to calculate risk, profit and RR Ratio for Amibroker (AFL)

theone3000 over 15 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 4)
  • Tags:
    amibroker, commentary

First save the formulae through FORMULA EDITOR. Then click on COMMENTARY. Immediately guru chart commentary will open. After that click on formula in guruchart commentary and click on LOAD button and select the formulae where you have saved. Then change the parametres of entry, stoploss,target for the current chart. Then click on commentary. You will get results.

Indicator / Formula

Copy & Paste Friendly
"Date="+Date();
Entry=10.15;
StopLoss=9.57;
Target=13.97;
"Entry="+WriteVal(Entry);
"StopLoss="+WriteVal(StopLoss);
"Target="+WriteVal(Target);
Risk=(Entry-StopLoss);
RiskPer=((Entry-StopLoss)/Entry)*100;
"Risk%="+WriteVal(RiskPer);
Profit=(Target-Entry);
ProfitPer=((Target-Entry)/Entry)*100;
"Profit%="+WriteVal(ProfitPer);
RRR=(Profit/Risk);
"RRRatio="+WriteVal(RRR); 

2 comments

Leave Comment

Please login here to leave a comment.