what am I missing here?

Questions about MultiCharts and user contributed studies.
User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

what am I missing here?

Postby arnie » 02 Sep 2016

Can't understand why I don't see that short position.
I'm always receiving having zero positions on.

Image

I've tried all Marketposition keywords and none retrieve that positon.
Also, can't get nothing regarding time of entry, price of entry.
I'm missing something, just can't figure it out.
Attachments
stat.png
(38.49 KiB) Downloaded 1530 times

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: what am I missing here?

Postby TJ » 02 Sep 2016

Can't understand why I don't see that short position.
I'm always receiving having zero positions on.

Image

I've tried all Marketposition keywords and none retrieve that positon.
Also, can't get nothing regarding time of entry, price of entry.
I'm missing something, just can't figure it out.
You are using ONCE.

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: what am I missing here?

Postby arnie » 02 Sep 2016

You are using ONCE.
Because I didn't want for this to continually output on every tick.
But that is not the problem. Removing the Once continues to not retrieve any data.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: what am I missing here?

Postby TJ » 02 Sep 2016

Is your position in a different account?


Check your symbol mapping.

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: what am I missing here?

Postby arnie » 02 Sep 2016

Is your position in a different account?


Check your symbol mapping.
Same account, mapping is OK.

I'm getting the account number, I'm getting the account rt equity, that's working fine but when trying to retrieve information about the trades, in realtime, nothing comes up.

These are all manual trades, not auto strategies.

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: what am I missing here?

Postby ABC » 02 Sep 2016

arnie,

this is probably the explanation. i_MarketPosition_at_Broker_for_The_Strategy will return the market position for a strategy on that chart and not the position at the broker.
You will likely nave to use i_MarketPosition_at_Broker.
Regards,

ABC
These are all manual trades, not auto strategies.

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: what am I missing here?

Postby arnie » 02 Sep 2016

arnie,

this is probably the explanation. i_MarketPosition_at_Broker_for_The_Strategy will return the market position for a strategy on that chart and not the position at the broker.
You will likely nave to use i_MarketPosition_at_Broker.
Regards,

ABC
These are all manual trades, not auto strategies.
One would think that but unfortunately, nothing seems to work

http://www.screencast.com/t/p3b0AK6eq

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: what am I missing here?

Postby ABC » 02 Sep 2016

It will probably not make a difference (although the help states for i_MarketPosition_at_Broker that "This function can only be used in indicators."), but what happens when you use MarketPosition_at_Broker without the "i_"?

Regards,

ABC

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: what am I missing here?

Postby arnie » 02 Sep 2016

It will probably not make a difference (although the help states for i_MarketPosition_at_Broker that "This function can only be used in indicators."), but what happens when you use MarketPosition_at_Broker without the "i_"?

Regards,

ABC
The exact same thing, retrieves zero when a position is opened.
By the way, is anyone on version 10 (beta1)?
Those on version 9.1, is this signal working?

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: what am I missing here?

Postby bensat » 02 Sep 2016

Why, if 'i_MarketPosition_at_Broker_for_The_Strategy' just works in an indicator, you don't write your output as indicator ? If you need it to compare system position & broker position you could make it via GV or ELC easily. You know that.

BUt I am asking myself why this is only usable in an indicator and not running in a signal ?

Kind Regards

Ben

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: what am I missing here?

Postby arnie » 02 Sep 2016

Why, if 'i_MarketPosition_at_Broker_for_The_Strategy' just works in an indicator, you don't write your output as indicator ? If you need it to compare system position & broker position you could make it via GV or ELC easily. You know that.

BUt I am asking myself why this is only usable in an indicator and not running in a signal ?

Kind Regards

Ben
Indicator or signal, the problem here is the fact that it seems no keyword is retrieving any data from the broker in relation to trades. Did anyone here tested that code I put here? Can you say if it works on your side and if it does, which MC version are you on?

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: what am I missing here?

Postby bensat » 03 Sep 2016

Is the <DEMO ACCOUNT> the issue, so the broker won't report anything ? Have you tried it on a <LIVE ACCOUNT> ?

Kind Regards

Ben

User avatar
arnie
Posts: 1594
Joined: 11 Feb 2009
Location: Portugal
Has thanked: 481 times
Been thanked: 514 times

Re: what am I missing here?

Postby arnie » 03 Sep 2016

Is the <DEMO ACCOUNT> the issue, so the broker won't report anything ? Have you tried it on a <LIVE ACCOUNT> ?

Kind Regards

Ben
So far only tested with the Demo account.

You're saying the demo API does not give access to this type of data?
So a trader to test his signal/indicator, can only do it on live accounts? How dangerous would that be? Managing a trade while looking if the signal/indicator is working properly and trying to fix it... I don't think so!
I'm a scalper, my trades can go from a couple of seconds to a couple of minutes, max. I cannot "play" with some code on a live account.

User avatar
bensat
Posts: 331
Joined: 04 Oct 2014
Has thanked: 46 times
Been thanked: 104 times

Re: what am I missing here?

Postby bensat » 03 Sep 2016

I am just afraid that might be at least part of the problem ? I can remember I tried to manage a strategy on a <DEMO> once, it did not work at all and I gave up immediately. Never asked why as I knew somebody had it working on a <LIVE> account.

So I guessed it's just a <DEMO> issue, which would make sense for me due to the setup on their end.

Kind Regards.

Ben


Return to “MultiCharts”