 |
QuantShare
2010-11-16 08:58:30
0
|
|
Best Answer
Here is a formula that plots the profit/loss percentage:
buypr = ValueWhen(brule, ref(open, -1));
sellpr = ValueWhen(srule, ref(open, -1));
per = ((sellpr / buypr) - 1) * 100;
per = round(per, 3);
PlotArrow(brule, "Buy", BelowLow, colorBlue);
PlotArrow(srule, "Sell\n".per, AboveHigh, colorRed);
- "brule" is the buy rule and "srule" is the sell rule.
|
|