Is there anyway a feature like this can be added to visualize trades on a chart better? I like these filled in squares showing where trades take place and I find this much easier to see. This is taken from Trade Navigator which I used prior to Wealth-lab.
Thanks!
Thanks!
Rename
I know everyone wants their favorite customization to be in WealthLab, but it's a pretty simple thing to do it yourself in a script (or add a single call to a custom library that does it).
And here you go - just add this routine to a C# Coded script, put it right above the Execute method, for example.
And here you go - just add this routine to a C# Coded script, put it right above the Execute method, for example.
CODE:
public override void Cleanup(BarHistory bars) { foreach (Position p in GetPositions()) { int xbar = p.IsOpen ? bars.Count - 1 : p.ExitBar; double xprice = p.IsOpen ? bars.Close.LastValue : p.ExitPrice; FillRectangle(p.EntryBar, p.EntryPrice, xbar, xprice, p.Profit > 0 ? WLColor.LawnGreen : WLColor.LightSalmon, "Price", true); } }
I'm a no coder...sorry.
No need to be a coder. But if you want to see this right now
1. make your block strategy,
2. hit "Open as C# Coded Strategy
3. Paste that block of code in the Editor as indicated here -
Run Strategy. (Adjust the colors in the block to your liking.)
1. make your block strategy,
2. hit "Open as C# Coded Strategy
3. Paste that block of code in the Editor as indicated here -
Run Strategy. (Adjust the colors in the block to your liking.)
We could also craft a custom block to do this, as a Concierge job?
You might want to add some transparency to those colored boxes. I'm not sure how much is appropriate.
CODE:For aesthetic customizations, C# code is easier and better. You can tweak the look.
FillRectangle(p.EntryBar, p.EntryPrice, xbar, xprice, p.Profit > 0 ? WLColor.LawnGreen.SetAlpha(128) : WLColor.LightSalmon.SetAlpha(128), "Price", true);
Your Response
Post
Edit Post
Login is required