Hi,
In my signal, I might have the following entry and exit with their identifiable names.
//buy signal
if marketposition=0 and CurrentContracts<TotalAllowedSize and RSI>20 and RSI<40 then
buy ("buyname") 1 contract next bar at Close limit;
//sell signal
if marketposition>=1 and CurrentContracts>0 and RSI>80 then
sell ("sellname") 1 contrtact next bar at Close limit;
Multichart doesn't seem to allow multiple entry or exits even if the entry/exit conditions are met.
Is there a properties setting that needs to be changed in order to allow for more than 1 entry or exit with the same name?
Thank you in advance.
same buy/sell signal not allowed
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
- MarketMicro
- Posts: 24
- Joined: 04 May 2014
- Been thanked: 1 time
Re: same buy/sell signal not allowed
In my signal, I might have the following entry and exit with their identifiable names.
Is there a properties setting that needs to be changed in order to allow for more than 1 entry or exit with the same name?
Thank you in advance.
Multichart doesn't seem to allow multiple entry or exits even if the entry/exit conditions are met.//buy signal
if marketposition=0 and CurrentContracts<TotalAllowedSize and RSI>20 and RSI<40 then
buy ("buyname") 1 contract next bar at Close limit;
//sell signal
if marketposition>=1 and CurrentContracts>0 and RSI>80 then
sell ("sellname") 1 contrtact next bar at Close limit;
Is there a properties setting that needs to be changed in order to allow for more than 1 entry or exit with the same name?
Thank you in advance.
Re: same buy/sell signal not allowed
If you do buy, then your MP is no longer = 0 and therefore that first conditional statement is not true. If you want to continually buy, then you should say if MP <> 0 (doesn't equal 0).
- MarketMicro
- Posts: 24
- Joined: 04 May 2014
- Been thanked: 1 time
Re: same buy/sell signal not allowed
Fair point, Tony. I've made the changes below to illustrate the issue.
I buy 10 contracts once, and want to sell 1 contract at a time. However, MC would only allow sell once, in other words, "sellname" should be executed many times but seems only one time is allowed.
I buy 10 contracts once, and want to sell 1 contract at a time. However, MC would only allow sell once, in other words, "sellname" should be executed many times but seems only one time is allowed.
Code: Select all
//buy signal
if marketposition=0 and CurrentContracts<TotalAllowedSize and RSI>20 and RSI<40 then
buy ("buyname") 10 contract next bar at Close limit;
//sell signal
if marketposition>=1 and CurrentContracts>0 and RSI>80 then
sell ("sellname") 1 contract next bar at Close limit;