Why is position size 1 share despite applying RiskStopLevel ?
Author: quaresma
Creation Date: 6/4/2018 12:23 PM
profile picture

quaresma

#1
Hi,all

I have a problem with developer and backtest my strategy, i already read posts with similar problem, but don't search decision for my problem.
I ser MaxPercRisk 3%, but the volume in all transactions = 1 qty; Help pls!What i do wrong? I want that riskstoplevel to count the risk from the price of entering the position
CODE:
Please log in to see this code.

profile picture

Eugene

#2
Hi,

If you read similar posts like you say, why fall into a popular fallacy?
CODE:
Please log in to see this code.


As instructed by the QuickRef, RiskStopLevel should precede your trading directives. The way the RiskStopLevel is positioned in your code doesn't let it apply to the Position being created.

P.S. Another inaccuracy in your code:

CODE:
Please log in to see this code.

Your code uses ATR which is an unstable indicator (check out the WealthScript Programming Guide > Indicators > Stability of Indicators on what this is). To fix:

CODE:
Please log in to see this code.
profile picture

quaresma

#3
ok,thank you for answer!I try now

UPD:
@Eugene, I try and having fulfilled all the conditions, but the number of contracts in the transactions remained equal to 1.
CODE:
Please log in to see this code.

profile picture

Eugene

#4
Please never use 3rd party image hosting services when posting screenshots. Instead, click "Add attachments" to attach it straight to your post. I've corrected your post and re-uploaded the image. Thanks.

The size (1 contract) isn't indicative of an issue. More details are required:

1. What is the starting capital?
2. How is your Symbol Info Manager set up?
profile picture

quaresma

#5
Next time I will correct! Thanks
I realized the problem is that the starting capital is 100,000, and the contract price is about 60,000, so he always takes 1 contract. Thanks for the help!
profile picture

Eugene

#6
Glad you figured it out ;)
profile picture

quaresma

#7
There was one more problem. When I have a position, let's say long and the market grows, the condition CrossUnder, but for some reason it just closes long, but does not open the short, although in the conditions there are 2 operations recorded: closing the long and immediately opening the short. What could be the problem?(When I change "Position Size" to Raw Profit Mode - it's work ok)

CODE:
Please log in to see this code.


profile picture

Eugene

#8
1. It could be due to insufficient capital to enter the position. Check out if the User Guide topic "100% of Equity Sizing" in the Strategy Window > BackTesting Strategies applies to your case.

2. Have you made sure it's the CrossUnder exit and not the stop? You've programmed the system to not open a short position after selling at stop (and vice versa for the "Stop_Short").
profile picture

quaresma

#9
You right, i've sure because i see on the comment trades and i see that trade,when i gets into the cycle of the CrossUnder, 1 the trade for closing the position is made(I selected this trade mark in the attachment) and the next (at the opening) the new one is not and it turns out to fall again into the condition where he has no position
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).