help with 5 days stop / open profit stop

Questions about MultiCharts and user contributed studies.
karlelias
Posts: 7
Joined: 23 Nov 2013

help with 5 days stop / open profit stop

Postby karlelias » 28 Oct 2014

Hi.

I hope someone can help me with a 5 days stop and open profit stop.

I have this code in all the signals:

Code: Select all

[IntrabarOrderGeneration = false]
inputs: BarToExitOn( 5 ) ;

if BarsSinceEntry = BarToExitOn or openpositionprofit > 0 then
Sell this bar at close ;
but all the signals calculate to sell on the first signal even if its less than 5 days/bars or on profit.

how to solve this.

Thanks for help

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: help with 5 days stop / open profit stop

Postby Henry MultiСharts » 29 Oct 2014

Hello karlelias,

The code works as expected on our end using MultiCharts 9.0 Release. Please make sure you are using this version and verify the order generation conditions: Why an Order Was or Was Not Executed.

If you still have the issue please send us (support@multicharts.com) the following information for further analysis:
- workspace you are using;
- in QuoteManager select the symbols you are using, make a right click on it->Export data->Export instrument (without data). Send us the QMD export file for analysis;
- in Power Language editor->File->Export->Export with dependent functions the study you are backtesting. Send us the study export file
- specify the version and build number of MultiCharts you are running (in MultiCharts go to Help tab-> About);
- instructions for replicating the error.


Return to “MultiCharts”