Semi-Discretionary or Semi-Automated Trading  [SOLVED]

Questions about MultiCharts and user contributed studies.
fibonaccci
Posts: 49
Joined: 26 Dec 2009
Has thanked: 34 times
Been thanked: 1 time

Semi-Discretionary or Semi-Automated Trading

Postby fibonaccci » 23 Aug 2012

After making a discretionary trading decision whether to go long or short
I’d like to activate either a short-only or long-only scaling strategy which should work fully automated.

Is it possible with MC to start such a strategy with a market order (e.g. buy at market;) by activating the “Automate Order Execution” in realtime (no backtesting)?
As alternative I have written an “Input” for a e.g. buy-stop-level which I have to type in and have to adapt to the current price level manually, as soon as the market hits the trigger (buy-stop) the trading is working automatically.

My problem: how can I start automating a strategy just from NOW on (=currenttime) that has no open positions “in the background” that would mix up with my further real trading positions ?
Does anyone have any experience with such semi-discretionary or semi-automated trading strategies?

Thank you.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: semi-discretionary or semi-automated trading

Postby Andrew MultiCharts » 23 Aug 2012


sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Re: semi-discretionary or semi-automated trading

Postby sptrader » 23 Aug 2012

*******************************************************************
Andrew I checked the links but there are no code examples.. Any chance that you could give us a simple example of an automated exit after a manual entry ?
I buy 1 Es and want to exit at a 3 bar low... how would we code this to exit automatically after a manual entry (from chart trader) ?

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: semi-discretionary or semi-automated trading

Postby Andrew MultiCharts » 23 Aug 2012

I believe you misunderstand how it should work, Sir.
  • 1. You apply a synchronizer strategy, in this case !From Broker To Chart Strategy!.
    2. You apply your own exit strategy.
    3. You turn on automation.
    4. You place a manual entry.
    5. In short time the synchronizer strategy opens position on chart only to match broker position.
    6. Your exit strategy sees the position on chart is opened and generates an exit order.

fibonaccci
Posts: 49
Joined: 26 Dec 2009
Has thanked: 34 times
Been thanked: 1 time

Re: semi-discretionary or semi-automated trading

Postby fibonaccci » 24 Aug 2012

Andrew,

thanks for the information which I have to try it out in live trading.

I figured out something different: add the following lines to the strategy and then turn the Status to ON under Format Signal then activate to SA mode.
Is this procedure Ok?

Code: Select all

if date = currentdate then
if time > currenttime-1 then
Thank you

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: semi-discretionary or semi-automated trading

Postby Andrew MultiCharts » 27 Aug 2012

Andrew,

thanks for the information which I have to try it out in live trading.

I figured out something different: add the following lines to the strategy and then turn the Status to ON under Format Signal then activate to SA mode.
Is this procedure Ok?

Code: Select all

if date = currentdate then
if time > currenttime-1 then
Thank you
Sir, what strategy are you referring to? A synchronizer signal or your own script?
What exactly you expect to achieve by adding these lines to script?

fibonaccci
Posts: 49
Joined: 26 Dec 2009
Has thanked: 34 times
Been thanked: 1 time

Re: semi-discretionary or semi-automated trading

Postby fibonaccci » 27 Aug 2012

Andrew,
by adding the two lines my strategy starts anew as there are no open positions in the past (bar).
Trading starts when I turn the Status to ON under Format Signal then activate to SA mode.
This way my discretionary decision ( go Long or Short, time, pricelevel) determines when to start automating the strategy. I'm looking for a fast and reliable way to activate an automated strategy only after I made dicretionary trading decisions. The automated trading should not run all the time but only when certain discretionary trading criteria are met.
Thanks

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: semi-discretionary or semi-automated trading

Postby Andrew MultiCharts » 27 Aug 2012

If you want manually to turn on automation for each strategy exit from your previous manual entry and then tunr it off, is will work. However the method i suggested will let you turn automation on only once and then simply use your manual orders for entries, your exits will be performed automatically.

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Re: semi-discretionary or semi-automated trading

Postby sptrader » 27 Aug 2012

If you want manually to turn on automation for each strategy exit from your previous manual entry and then tunr it off, is will work. However the method i suggested will let you turn automation on only once and then simply use your manual orders for entries, your exits will be performed automatically.
****************************************************************************
Andrew- It works great BUT - the historical orders don't disappear as they should..(I have chart trader - show historical orders UNCHECKED) .... see attached...
Is there any way that I can have them removed when the trade is closed ?? (too much chart clutter with them)
Attachments
Historical orders stay.png
(59.52 KiB) Downloaded 1975 times

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: semi-discretionary or semi-automated trading

Postby Andrew MultiCharts » 29 Aug 2012

****************************************************************************
Andrew- It works great BUT - the historical orders don't disappear as they should..(I have chart trader - show historical orders UNCHECKED) .... see attached...
Is there any way that I can have them removed when the trade is closed ?? (too much chart clutter with them)
If the box is unchecked, they should not be there if the box is indeed unchecked. Please come to our live chat to demonstrate the situation: http://messenger.providesupport.com/mes ... pport.html

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Re: semi-discretionary or semi-automated trading

Postby sptrader » 30 Aug 2012

Here is the simple code that I used to exit my manual entry..historical trades ALWAYS remain on the screen, if you try it, you'll see what I mean..(even with charttrader show historical trades unchecked.) Using Qclv12 oil contract and IQfeed..MC8 64bit. bld 5622 using "from broker to strategy synchronizer.."..

Code: Select all

Inputs: Pft(30),Stp(30); {tight targets to generate many trades, to show the problem}

vars:mp(0),opp(0);
opp = openpositionprofit;
mp = marketposition(0);
setstoploss(stp);
setprofittarget(Pft);

if opp >= 100 then begin {BE exit not needed with tight targets}
sell next bar at entryprice(0) + 1 point stop;
buytocover next bar at entryprice(0) - 1 point stop;
end;

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: semi-discretionary or semi-automated trading  [SOLVED]

Postby Andrew MultiCharts » 30 Aug 2012

If "Show historical orders" box is unchecked, all historical orders, which are also in Order and Position Tracker window on Orders tab are hidden. Such orders are dispayed on chart with "@ 1,2345" execution price label. Everything else will not be affected by this box (backtested orders, synch orders, strategy orders on chart).

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Re: semi-discretionary or semi-automated trading

Postby sptrader » 30 Aug 2012

If "Show historical orders" box is unchecked, all historical orders, which are also in Order and Position Tracker window on Orders tab are hidden. Such orders are dispayed on chart with "@ 1,2345" execution price label. Everything else will not be affected by this box (backtested orders, synch orders, strategy orders on chart).
*******************************************************************
** That's what I was afraid of, manual entry and auto exit is difficult to see, if historical positions are not removed when filled...
Thanks, Andrew..

justmake
Posts: 42
Joined: 21 Dec 2010
Has thanked: 15 times
Been thanked: 1 time

Re: semi-discretionary or semi-automated trading

Postby justmake » 07 Oct 2012

Hello,

By the way, I notice the synchronizer script's default setting is [intrabarordergeneration = true];

Is it possible to set it to "false"?

Because my strategy is executed at the end of bar(IOG=False), and if I use the synchronizer(IOG=True), will there be conflict issue when running in real-time.

please advise.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: semi-discretionary or semi-automated trading

Postby Andrew MultiCharts » 10 Oct 2012

Hello,

By the way, I notice the synchronizer script's default setting is [intrabarordergeneration = true];

Is it possible to set it to "false"?

Because my strategy is executed at the end of bar(IOG=False), and if I use the synchronizer(IOG=True), will there be conflict issue when running in real-time.

please advise.
Basically it is possible, however it doesn't make sense to me, Justmake. Assume you entered from script (entries only) and now you want to exit manually. Without IOG=ON you entered at Open of a bar (#1), then you decided to exit somewhere in the middle. By the Close of the bar, you have no open market position at broker, but your script still thinks it is open and will have to wait till the Open of next bar, when synch order is placed. And only after this, your entry strategy understands that you are flat and is ready to place entry order on next bar (#3), but what if you had perfect condition for entry on this current bar (#2). IOG=on for 1 script and IOG=OFF for another script won't cause you any issues.


Return to “MultiCharts”