Initial Capital allocation
Forums › ProRealTime English forum › ProOrder support › Initial Capital allocation
- This topic has 8 replies, 2 voices, and was last updated 3 years ago by Albaran.
Tagged: capita, capital allocation, equity, strategyprofit
-
-
05/12/2021 at 4:00 PM #169492
Hi there,
Small question; is it possible to program the initial capital allocation over, say, the days of the week in automated trading – so without the need to change it manually everyday?
Right now, the only possibility I know of is to change it in the window to the left when you’re about to start running your code in real time. Is there another way?
If not, is that something they, at Prorealtime, are working on?
Thanks a lot for the replies..
05/12/2021 at 4:40 PM #169496Post your topic in the correct forum:
_ ProRealTime Platform Support: only platform related issues.
_ ProOrder: only strategy topics.
_ ProBuilder: only indicator topics.
_ ProScreener: only screener topics
_ General Discussion: any other topics.
_ Welcome New Members: for new forum members to introduce themselves.I moved it from ProRealTime Platform Support.
Thank you 🙂
————————————————————————————————————————
Capital can only be automatically updated with the addition of the STRATEGYPROFIT of the strategy.
It’s not like indicators, where you have a property window to change settings.
05/12/2021 at 4:43 PM #16949705/12/2021 at 4:53 PM #169502No, I moved it. Do not double post.
05/13/2021 at 11:48 AM #169571Okay, then I’ve got another question related to the STRATEGYPROFIT command.
It says in the manual that Strategyprofit[1] returns the profit or losses at the close of the previous bar.
Does this also mean that, if you’re onmarket at the close of the previous bar, it takes into account the loss or profit of the current open position?
05/13/2021 at 1:58 PM #169577No, STRATEGYPROFIT is updated after each trade closes.
The current temp profit/loss is returned by POSITIONPERF, which is a positive/negative multiplier that you may want to convert into money or pips:
12PositionPerf * PositionPrice / PipSize * abs(CountOfPosition) //PipsPositionPerf * PositionPrice / PipSize * pipvalue * abs(CountOfPosition) //Moneythen you can add POSITIONPERF (converted into Money) to STRATEGYPROFIT in order to get the whole current profit/loss.
05/13/2021 at 3:26 PM #169584I’ll try that instead then! I’ve been testing the following piece of code :
123If Dayofweek = 5 and Time = 230000 and ((positionprice - tradeprice)*countofshortshares) > - X thenquitendifcombined with the desire to stop any current open position before 11pm friday in order to avoid overnight funding during the weekend
Below code (any ongoing loss less than X or ongoing profit that hasn’t reached the target profit can be closed)
1((positionprice - tradeprice)*countofshortshares) > - Xwas a parallel attempt to your code (at least, so it does seem to me) :
1PositionPerf * PositionPrice / PipSize * pipvalue * abs(CountOfPosition)but my code doesn’t seem to be working like I want it to! I don’t know why ?
05/13/2021 at 4:48 PM #169593You should post an exampleof code that I can test.
If you post it, please let me also know what instrument and TF you tested it, so I can replicate your trades.
05/21/2021 at 3:29 PM #170126 -
AuthorPosts