Thank TJ.
Got it. So for solely backtesting only, I will have to change all orders to 'this bar on Close.'
When I'm ready to go live, I will change orders to 'next bar at Market.'
Thanks.
Search found 6 matches
- 16 Nov 2012
- Forum: MultiCharts
- Topic: Closing All Open Positions if LastBarOnChart [SOLVED]
- Replies: 3
- Views: 1995
- 15 Nov 2012
- Forum: MultiCharts
- Topic: Closing All Open Positions if LastBarOnChart [SOLVED]
- Replies: 3
- Views: 1995
Closing All Open Positions if LastBarOnChart [SOLVED]
I want to close all open positions if the LastBarOnChart is true. I tried the following code but an error was generated - "Cannot use next bar's price and close order in the same strategy" if LastBarOnChart then begin Sell ("LastBarLE") this bar on Close; BuyToCover ("LastBarSE") this bar on Close; ...
- 01 Sep 2012
- Forum: MultiCharts
- Topic: "Extremes", "highest/lowest" functions affecting maxbarback
- Replies: 6
- Views: 4710
Re: "Extremes", "highest/lowest" functions affecting maxbarb
Thanks Andrew.
Your explanation on the MaxBarsBack calculation is really helpful. This gives me some idea to proceed on.
Your explanation on the MaxBarsBack calculation is really helpful. This gives me some idea to proceed on.
- 29 Aug 2012
- Forum: MultiCharts
- Topic: "Extremes", "highest/lowest" functions affecting maxbarback
- Replies: 6
- Views: 4710
Re: "Extremes", "highest/lowest" functions affecting maxbarb
So, is there a calculation mechanism or an error in the code which prevent the script to obey the Max Bars Back parameters set?
- 28 Aug 2012
- Forum: MultiCharts
- Topic: "Extremes", "highest/lowest" functions affecting maxbarback
- Replies: 6
- Views: 4710
Re: "Extremes", "highest/lowest" functions affecting maxbarb
Thanks sptrader, that's interesting to know.
I'm using 32bit version.
I'll try to test on 64bit, but is there a reason why this doesn't work on 32bit?
I'm using 32bit version.
I'll try to test on 64bit, but is there a reason why this doesn't work on 32bit?
- 28 Aug 2012
- Forum: MultiCharts
- Topic: "Extremes", "highest/lowest" functions affecting maxbarback
- Replies: 6
- Views: 4710
"Extremes", "highest/lowest" functions affecting maxbarback
This is in reference to the error I have been getting "Tried to reference back more bars ....Please increase the Max Bars Back setting." The code doesn't seem to obey the Max Bars Back setting that I set. After breaking down and testing smalls snippets of the following code, I think the "extremes" f...