i use variable position sizes based on the amount of money i have in my account.
the thing is i have noticed that when i look to sell this amount, it changes, mostly because of the change in price when its calculated.
1
2
3
4
5
6
7
8
9
10
11
12
startingcapital=100
cp=strategyprofit
contractsize=(startingcapital+cp)/high
ifbuyingconditionthen
buycontractsizeonmarket
endif
ifsellingconditionthen
sellcontractsizeonmarket
endif
This means i always have a little bit of left over in the market and I recently noticed, it affects the efficiency of my systems.
is there anyway i can create an array which remembers the value of the contract size use in a trade.
this is especially helpful when there are cumulative orders on the way.
i wanted to try some loops with trade price then realised that trade price could also consider sells, which is not what i want, i want to arrays to purely pick up the number of contracts of each previous trade.
If the system will always close out the oldest code, then this shouldn’t be an issue to work out.
novembrepleut – Welcome to the forums. Please re-read the forum rules before posting again. Your topic has been moved to the correct place for strategy related questions.
The following will just close everything that you have open:
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue