Stops Executing on Multiple Bars  [SOLVED]

Questions about MultiCharts and user contributed studies.
tony
Posts: 420
Joined: 14 Jun 2013
Has thanked: 30 times
Been thanked: 81 times
Contact:

Stops Executing on Multiple Bars

Postby tony » 11 Jul 2013

In my script I am using market orders on all stops. Part of the position uses an IFF statement while the remaining position use a set variable. I am using IOG=True with all variables set to intrabarpersist.

The contracts that use an IFF statement at times will have the same stop as those contracts that do not per the logic below.

st2 = IFF( close crosses above var8 or close > var8, var8, var3 );

I then assign stops as follows (leaving out part of the script that is not needed for this question)


Sell ( "LXSTP-B3" ) 17 Contracts Next Bar at st2 stop;
Sell ( "LXSTP-C3" ) 3 Contracts Next Bar at var3 Stop;

When var3 is violated and a market order generated, what happens is on the bar this occurs, 17 contracts are stopped out, but not until the next bar are the remaining 3 stopped out. In theory all 20 should stop out on the same bar. Any idea why this is not happening?

Thank You -

tony
Posts: 420
Joined: 14 Jun 2013
Has thanked: 30 times
Been thanked: 81 times
Contact:

Re: Stops Executing on Multiple Bars  [SOLVED]

Postby tony » 14 Jul 2013

Problem solved, forgot to check the box to allow more than one entry and exit per bar. I forget exactly what the radio button options where but wanted to at least post a follow up in case anyone else is experiencing the same.


Return to “MultiCharts”