Hello all,
I use the Custom 1 Line indicator to show whether a given system is flat or, if on market, how many contracts have been bought/sold.
To do this, I've modified the formula as attached.
The problem is that sometimes, the indicator shows that the system is flat, while that's not true, and I have to turn off it by clicking Status and turn on it again to read the correct position of the system.
Any suggestion?
Thanks in advance
Problem with the Custom 1 Line indicator
Problem with the Custom 1 Line indicator
- Attachments
-
- 2022-05-30_15-54-22.png
- (7.94 KiB) Not downloaded yet
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
- Svetlana MultiCharts
- Posts: 645
- Joined: 19 Oct 2017
- Has thanked: 3 times
- Been thanked: 163 times
Re: Problem with the Custom 1 Line indicator
Hi Leo,
These keywords show the market position of a strategy on a chart, the value is not related to the broker profile. Please compare the indicator’s value on the latest bar with the latest trade in the Strategy Performance Report on the same chart. Do the values correspond?
These keywords show the market position of a strategy on a chart, the value is not related to the broker profile. Please compare the indicator’s value on the latest bar with the latest trade in the Strategy Performance Report on the same chart. Do the values correspond?
Re: Problem with the Custom 1 Line indicator
Hello Svetlana,
no, sometimes they do not correspond. Please consider that I check a couple of times per day that the number of contracts from charts and the broker are aligned. As said, sometimes I notice that the custom 1 line indicator is not updated correctly, and shows 0 contracts whereas I am long or short with 1 or more contracts. By clicking on the Status button of the Custom 1 line indicator, it reload correctly showing the correct number of contracts
no, sometimes they do not correspond. Please consider that I check a couple of times per day that the number of contracts from charts and the broker are aligned. As said, sometimes I notice that the custom 1 line indicator is not updated correctly, and shows 0 contracts whereas I am long or short with 1 or more contracts. By clicking on the Status button of the Custom 1 line indicator, it reload correctly showing the correct number of contracts
- Svetlana MultiCharts
- Posts: 645
- Joined: 19 Oct 2017
- Has thanked: 3 times
- Been thanked: 163 times
Re: Problem with the Custom 1 Line indicator
If you want to get the broker position, please use i_MarketPosition_at_Broker keyword.
Configure your indicator in Format – Study – Format – Properties as shown in the picture.
Configure your indicator in Format – Study – Format – Properties as shown in the picture.
- Svetlana MultiCharts
- Posts: 645
- Joined: 19 Oct 2017
- Has thanked: 3 times
- Been thanked: 163 times
Re: Problem with the Custom 1 Line indicator
Please refer to the help for GetAppInfo.How to detect Live trading mode vs. Backtesting in Powerlanguage ?
You may want to use:
GetAppInfo(aiRealTimeCalc)
GetAppInfo(aiStrategyAuto) – returns 0 for indicators, as they cannot trade.