Wrong stop levels
Author: Ruslan8
Creation Date: 8/22/2013 10:32 AM
profile picture

Ruslan8

#1
Hello,

I'm testing Wealth Labs Developer now.

I wrote some strategy and it should send signals SellAtStop. Price crosses parameter of SellAtStop, but WLD do nothing.

I use DrawCircle to verify what params are send to SellAtStop() and PlotStops() to understand what WLD do.

I identify something like a bug - i send SellAtStop(bar + 1,LastActivePosition, 131.8) and it's drawn on 130.8
but PlotStops() put a red point on wrong level - 130.0!!!

Same with all other - i send 131.4, but WLD work with 131.0(!)

It's look like WLD rounds price down (from 130.4 to 130.0, from 131.4 to 131.0 and so on).

What can i do to fix this bug?


PS WLD 6.5
profile picture

Eugene

#2
Let's see your script and then we'll tell what's wrong with it and how to fix it.
profile picture

Ruslan8

#3
My code is:
CODE:
Please log in to see this code.

myCoolFormula() give some price, i draw it with DrawCircle and use CoverAtStop.

I marked DrawCircle and CoverAtStop with pink circles at picture
profile picture

Ruslan8

#4
WLD must exit, but it rounds data and skip SellAtStop;

Low of that bar is 131.13

Exit price on bar is 131.45. So it must be Sold anyway.
profile picture

Cone

#5
1. What are the settings in the Symbols Info Manager for the instrument you're trading?

2. Some things to try in the meantime:
a. Disable Futures Mode to test the signals, and/or,
b. Select Preferences (F12) > Backtest Settings > and check "Turn off limit/stop rounding entirely" (at the bottom).

profile picture

Ruslan8

#6
> 1. What are the settings in the Symbols Info Manager for the instrument you're trading?

Type -equity, Margin 1, point value 1, Tick 1, Decimals 4

> b. Select Preferences (F12) > Backtest Settings > and check "Turn off limit/stop rounding entirely" (at the bottom).

This helps. Strategy work as it should be.

What is the point?
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).