Hi.
Please tell me how to write a sample code to test the patterns strategy in mc.net
Example
if(Bars.Close[0]<Bars.Close[1] && Bars.Close[1]<Bars.Close[2])
m_Order0.Send
Thank you.
pattern [SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: pattern
Hello alex625144,
There are multiple prebuilt strategy codes in MultiCharts .Net editor already.
Please describe your final goal in details.
There are multiple prebuilt strategy codes in MultiCharts .Net editor already.
Please describe your final goal in details.
-
- Posts: 2
- Joined: 02 Oct 2012
- Has thanked: 1 time
Re: pattern
I want backtest next strategy:
if (close[-1]>close[-2]<close[-3]<close[-4])
buy at market
sell through one bar
I looked at all the examples of strategies in the standard library, but such is not found. Or please specify the name of such a strategy in the standard library.
Thank you.
if (close[-1]>close[-2]<close[-3]<close[-4])
buy at market
sell through one bar
I looked at all the examples of strategies in the standard library, but such is not found. Or please specify the name of such a strategy in the standard library.
Thank you.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: pattern [SOLVED]
You can reference previous bars values like that:
Code: Select all
Bars.Close[1]>Bars.Close[2]