to close a short:
buytocover("exit short)") entry("demo 1.1 sell short")this bar at close;
to close a long:
sell("exit long") Entry("demo 1.1 buy") this bar at close;
it works in MC64 but the positions keep running on broker side.. and are not closing.
should i add some extra code ?
closing position on avatrade not working with autotrading
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: closing position on avatrade not working with autotradin
Hello bjornc,
In MultiCharts please go to File -> New -> Order and position tracker window->Orders tab.
What is the status of your order?
Please go to the Logs tab. Are there any errors related to this order?
Can you see any orders sent from MultiCharts in your broker's platform?
In MultiCharts please go to File -> New -> Order and position tracker window->Orders tab.
What is the status of your order?
Please go to the Logs tab. Are there any errors related to this order?
Can you see any orders sent from MultiCharts in your broker's platform?
Re: closing position on avatrade not working with autotradin
hi,Hello bjornc,
In MultiCharts please go to File -> New -> Order and position tracker window->Orders tab.
What is the status of your order?
Please go to the Logs tab. Are there any errors related to this order?
Can you see any orders sent from MultiCharts in your broker's platform?
this is what's in the orders tab:
30/12/2013 21:28 30/12/2013 21:28 USDJPY 1 Minute Sell Exit Market Sell 1.000 1.000 0 Filled 105,087 GTC AvaTrade 2 5399269 26618142 quicktestbuysell Untitled-4
30/12/2013 21:27 30/12/2013 21:27 USDJPY 1 Minute Buy Entry Market Buy 1.000 1.000 0 Filled 105,113 GTC AvaTrade 2 5399269 26618134 quicktestbuysell Untitled-4
30/12/2013 21:24 30/12/2013 21:24 USDJPY 1 Minute Sell Exit Market Sell 1.000 1.000 0 Filled 105,095 GTC AvaTrade 2 5399269 26618113 quicktestbuysell Untitled-4
30/12/2013 21:23 30/12/2013 21:23 USDJPY 1 Minute Buy Entry Market Buy 1.000 1.000 0 Filled 105,111 GTC AvaTrade 2 5399269 26618108 quicktestbuysell Untitled-4
what happens in avatrade is : an exit is an actual sell order so the long is not closed.. but a new sell is made instead.
i wrote this little programm to test on the 1minute:
if marketposition <= 0 then
begin
//buytocover next bar at open;
Buy 1000 contracts next bar at Open;
end
else if marketposition >=0 then
begin
sell next bar at open; // should exit or close the position
//sell short 1000 contracts next bar at Open;
end;
no log errors.. it's just that avatrade does not seem to take an "exit" order to close the position but instead creates a new fresh order
regards
Last edited by bjornc on 30 Dec 2013, edited 1 time in total.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: closing position on avatrade not working with autotradin
bjornc, please make sure hedging is disabled for your AVAtrade account.
Re: closing position on avatrade not working with autotradin
bjornc, please make sure hedging is disabled for your AVAtrade account.
I dont think thats possible:
http://www.avatrade.com/trading-info/trading-conditions
there's 2 different "acount type"
a) avatrader (this one is used with multicharts and has 1:200 leverage) build in.
b) metatrade(1:400)
also why I cannot exit a position.. weather it's on leverage or not?.. apparently it's allowed to open a position.. on leverage.
is this only for avatrade? or is it general for all brokers . Hard to imagine cfd trading without leverage.
or did I misunderstand you ?
regards
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: closing position on avatrade not working with autotradin
bjornc, this has nothing to do with the leverage. Hedging is a different thing. You can read about it over the Internet: Investopedia, Wikipedia.bjornc, please make sure hedging is disabled for your AVAtrade account.
I dont think thats possible:
http://www.avatrade.com/trading-info/trading-conditions
there's 2 different "acount type"
a) avatrader (this one is used with multicharts and has 1:200 leverage) build in.
b) metatrade(1:400)
also why I cannot exit a position.. weather it's on leverage or not?.. apparently it's allowed to open a position.. on leverage.
is this only for avatrade? or is it general for all brokers . Hard to imagine cfd trading without leverage.
or did I misunderstand you ?
regards
MultiCharts does not support hedging. This is applied to all supported brokers.
There is no way to have two separate positions for the same instrument. Please refer to the following article for more details.
Please contact your broker directly to disable hedging for your account. Once you do that - you will be able to perform autotrading in MultiCharts and manage your positions properly.