Strategy not producing same values as indicators putting out .
-
- Posts: 53
- Joined: 04 Jan 2008
- Has thanked: 21 times
- Been thanked: 3 times
Strategy not producing same values as indicators putting out .
I've gone and checked that strategy and indicator have same days loaded and I am not using IOG but I am unable to duplicate values put out by my indicators in my strategies. Even duplicating the code directly into strategy from indicator does not resolve it so I am thinking of digging into documentation on Bamboo's ADE with the idea of placing the indicator values into a holder and being able to have the strategy retrieve those values to see if this might resolve my problem. Does this sound possible or will I just be wasting my time. Thanks for any input.
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Strategy not producing same values as indicators putting out .
If this is a coding question, you have to post the codes.
Indicators are calculated in real time. ie similar to IOG.
Strategies are calculated at End of Bar (EOB).
Indicators are calculated in real time. ie similar to IOG.
Strategies are calculated at End of Bar (EOB).
-
- Posts: 53
- Joined: 04 Jan 2008
- Has thanked: 21 times
- Been thanked: 3 times
Re: Strategy not producing same values as indicators putting out .
Appreciate your input. I was going on this statement found in the wiki. "On the historical data the indicator is calculated on the bar close values only. There are multiple historical data calculation modes for the signal. In order for the indicator and signal historical calculations to match, IOG and Bar Magnifier should be disabled for the signal."
I have another question as I'm digging into ADE and my first attempt has brought a EL Collections error "List Index is out of bounds". I'm applying it to a 6 point chart so now thinking I should try using ADE for Type Zero Bars as point bars are constructed from tick bars(Type Zero) but Point bars have a bartype=5. Question is, will Type Zero functions work on Point bars ? Hoping this will remedy the error. Code is quite extensive, hoping to avoid having to post that.
I have another question as I'm digging into ADE and my first attempt has brought a EL Collections error "List Index is out of bounds". I'm applying it to a 6 point chart so now thinking I should try using ADE for Type Zero Bars as point bars are constructed from tick bars(Type Zero) but Point bars have a bartype=5. Question is, will Type Zero functions work on Point bars ? Hoping this will remedy the error. Code is quite extensive, hoping to avoid having to post that.
Re: Strategy not producing same values as indicators putting out .
Did you uncheck the update on every tick option on the indicator? It should be the same once you uncheck that.
Re: Strategy not producing same values as indicators putting out .
also.. just a thought-- if your using tick based bars vs time based bars-- you need to use the _s suffix reserved words...
Example = LastBarOnChart_s vs LastBarOnChart
Example = LastBarOnChart_s vs LastBarOnChart
-
- Posts: 53
- Joined: 04 Jan 2008
- Has thanked: 21 times
- Been thanked: 3 times
Re: Strategy not producing same values as indicators putting out .
Thanks you guys, appreciate the suggestions. I have unchecked "update every tick", problem persists and I am trying GV AccuracySetNamedDouble
but it returns "0" but still a couple more to try. The code paints my bars green when the code produces a # >= 5 or red if the total is <= -5 , yellow in between. I have tried using LastBarOnChart_s and without "s" but my indicator quits wording as soon as it compiles. Not sure why. Also I am trying to get the newest versions of ELCollections and ADE 2.1 and whats available in TS forum has an installer that goes with it that requires TS 9.1 or higher for it to install directly. How do we get this into MultiCharts ? I have older versions ELC 1.05 and ADE 1.07 but newest is 2.01 and a new dll ELCollections2.dll
but it returns "0" but still a couple more to try. The code paints my bars green when the code produces a # >= 5 or red if the total is <= -5 , yellow in between. I have tried using LastBarOnChart_s and without "s" but my indicator quits wording as soon as it compiles. Not sure why. Also I am trying to get the newest versions of ELCollections and ADE 2.1 and whats available in TS forum has an installer that goes with it that requires TS 9.1 or higher for it to install directly. How do we get this into MultiCharts ? I have older versions ELC 1.05 and ADE 1.07 but newest is 2.01 and a new dll ELCollections2.dll
-
- Posts: 53
- Joined: 04 Jan 2008
- Has thanked: 21 times
- Been thanked: 3 times
Re: Strategy not producing same values as indicators putting out .
Found out my problem with strategy syncing with indicator data has to do with data2. As long as I have a reference to data2 in the variables of any kind I instantly lose synchronization between my indicator and the strategy. Now I just need to figure out why. Any help appreciated.
- Mark Brown
- Posts: 185
- Joined: 29 Nov 2016
- Has thanked: 125 times
- Been thanked: 18 times
Re: Strategy not producing same values as indicators putting out .
Hopeful after more than a decade.If this is a coding question, you have to post the codes.
Indicators are calculated in real time. ie similar to IOG.
Strategies are calculated at End of Bar (EOB).
It’s now possible to send automatic orders based on additional calculation events, regardless of the IOG mode. These new settings are added to the Format Signal dialog in the Properties tab
Re: Strategy not producing same values as indicators putting out .
Found out my problem with strategy syncing with indicator data has to do with data2. As long as I have a reference to data2 in the variables of any kind I instantly lose synchronization between my indicator and the strategy. Now I just need to figure out why. Any help appreciated.
In the strategy are you declaring it as data2 like this?
Vars: Price2 ( 0, data2);
Price2 = Close data2;