Search found 7 matches
- 15 Apr 2015
- Forum: MultiCharts
- Topic: Partial Sell Order not working [SOLVED]
- Replies: 2
- Views: 1876
Re: Partial Sell Order not working [SOLVED]
Thanks Orion, I found my error...I was trying to sell a negative number of shares. In case it's helpful to anyone, my code did this: rebalRounded was positive (to buy more shares) or negative (to sell some shares). I forgot to multiply it by -1 before the sell order. Sorry for bothering everyone and...
- 15 Apr 2015
- Forum: MultiCharts
- Topic: Partial Sell Order not working [SOLVED]
- Replies: 2
- Views: 1876
Partial Sell Order not working [SOLVED]
Hi, I'm trying to code a rebalance which requires selling a partial amount of my position sometimes. The number of shares I want to sell is in a variable called "rebalRounded" This order is never filled: Sell ("LX - rebal") rebalRounded contracts total from entry("LE") next bar at market; But it doe...
- 13 Apr 2015
- Forum: MultiCharts
- Topic: Portfolio Backtesting - total portfolio liquidation value [SOLVED]
- Replies: 3
- Views: 1902
Re: Portfolio Backtesting - total portfolio liquidation valu [SOLVED]
Thanks very much.
Interestingly, if you use:
it will show the final equity position even though it runs this on the first bar, which is why I was very confused.
Thanks for your help.
Interestingly, if you use:
Code: Select all
once print(NumToStr(Portfolio_Equity, 2));
Thanks for your help.
- 13 Apr 2015
- Forum: MultiCharts
- Topic: Portfolio Backtesting - total portfolio liquidation value [SOLVED]
- Replies: 3
- Views: 1902
Portfolio Backtesting - total portfolio liquidation value [SOLVED]
Hi, I’m attempting to write portfolio rebalancing code for a portfolio backtest. On the last bar of each month, I wish to evaluate the portfolio and rebalance based on some code I have written to determine what percentage of capital should be invested in each symbol. What I need is: 1) For each symb...
- 01 Jun 2013
- Forum: MultiCharts
- Topic: Point & Figure Trading Strategy [SOLVED]
- Replies: 2
- Views: 5367
Point & Figure Trading Strategy [SOLVED]
I'm interested in developing a PnF trading strategy. Does MC Powerlanguage have a way to determine the type of the current column? eg: if the current column is a down column, I want to put a buy order when a new up column is established. ie: if (currentcolumn is down) buy next bar at market. I've re...
- 29 May 2012
- Forum: MultiCharts
- Topic: Logging a variable
- Replies: 2
- Views: 885
Re: Logging a variable
Thanks. I will try PosTradeIsOpen.
- 29 May 2012
- Forum: MultiCharts
- Topic: Logging a variable
- Replies: 2
- Views: 885
Logging a variable
I would like to add a variable to the Strategy Performance Report list of trades. It shows me the trade details, but I want to log the initial value of my stop loss as well. I have a variable in my code called iStop. Is there any way to add iStop to the Strategy Performance Report such that it is lo...