It looks like some gloabal variables like EntryPrice, BarsSinceEntry, BarsSinceExit do not keep thier values across different studies, actually they are always equal to 0.
Please, confirm, that you are aware of these bugs in EL and it is on your list to fix.
Thanks
Victor
Global variables in EL
- Stanley Miller
- Posts: 556
- Joined: 26 Jul 2005
- Has thanked: 3 times
Global Variables in New beta
Dear Support.
I downloaded new beta release - it is fantastic, Thanks you! But I still have issues with BarsSinceExit, BarsSinceEntry reserve keywords.
In new beta they have thier values correct. However they have the value only on that signal, which actually Exits (Enters) trade. On other signals those values are '0'. So BarsSinceEntry and BarsSinceExit do not keep values acrooss studies.
Is it behavour that supposed to be? I am not sure now?
I downloaded new beta release - it is fantastic, Thanks you! But I still have issues with BarsSinceExit, BarsSinceEntry reserve keywords.
In new beta they have thier values correct. However they have the value only on that signal, which actually Exits (Enters) trade. On other signals those values are '0'. So BarsSinceEntry and BarsSinceExit do not keep values acrooss studies.
Is it behavour that supposed to be? I am not sure now?
Re: Global Variables in New beta
Victor, that is the supposed behaviour, because these reserved words are no Global Variables. So you will only have their value in the one study entering/exiting the trade and not in a different strategy. What you can do is using Global Variables, PushPop or EasyLanguage Collections to save this value for Entryprice etc. and make it available for other studys to call it.Dear Support.
I downloaded new beta release - it is fantastic, Thanks you! But I still have issues with BarsSinceExit, BarsSinceEntry reserve keywords.
In new beta they have thier values correct. However they have the value only on that signal, which actually Exits (Enters) trade. On other signals those values are '0'. So BarsSinceEntry and BarsSinceExit do not keep values acrooss studies.
Is it behavour that supposed to be? I am not sure now?
Chris
I guess the easiest way would be to include the MACD and Stochastic in your strategy. If you are using different time frames (or symbols) then add additional data streams. You can find a brief explanation in the EL reference guides.Chris:
can you give an example how to pass variable from one study to another?
e.g. I have a MACD and a Stochastic, if both are over 80, I want a sell signal. How can this be done?
Chris
Hi, Dear MC support.
I spent some time to figure out the behavor of EntryPrice, BarsSinceEntry and BarsSinceExit.
I figured out, that both EntryPrice and BarsSinceEntry work perfect and both keep thier values across Signals (if Signals have status ON).
However, BarsSinceExit always '0' even on the same signal where exit took place. BarsSinceExit doesn't seem to be working in new beta release.
Or I do not understand what this Global variable shows, either it is still a bug.
Please, confirm, you are aware of that.
Thanks, Victor
I spent some time to figure out the behavor of EntryPrice, BarsSinceEntry and BarsSinceExit.
I figured out, that both EntryPrice and BarsSinceEntry work perfect and both keep thier values across Signals (if Signals have status ON).
However, BarsSinceExit always '0' even on the same signal where exit took place. BarsSinceExit doesn't seem to be working in new beta release.
Or I do not understand what this Global variable shows, either it is still a bug.
Please, confirm, you are aware of that.
Thanks, Victor
- Stanley Miller
- Posts: 556
- Joined: 26 Jul 2005
- Has thanked: 3 times
Dear Victor,BarsSinceExit always '0' even on the same signal where exit took place. BarsSinceExit doesn't seem to be working in new beta release.
Or I do not understand what this Global variable shows, either it is still a bug.
Please, confirm, you are aware of that.
Thanks, Victor
This is the way BarsSinceExit works. It returns the number of bars since the specified exit and it always returns 0 if you use it without parameter because the current position is still open. You have to use BarsSinceExit(1) to receive a number of bars since the exit that occurred one position ago.
- Stanley Miller
- Posts: 556
- Joined: 26 Jul 2005
- Has thanked: 3 times
Yes, we are going to change this as you correctly mentioned. We are on holidays returning Jan 9, we will release the new beta version after that.I did that and got error: Position index 1 is out of bounds. From other message thread I've read that you are preparing new beta within this week where this problem will go away!? It is still within this week?
Thanks a lot for your help!
Dear MC Support.
BarsSinceExit(1) works perfectly in new beta. But I still have problems with passing ddata between strategies, Signals and functions.
You said, we can use PushPop functions, but I don'e see them in EL. You also talked about EL Collections!?
Could you, Please, give any examples on how to use EL Collections or Push/Pop functions or any reference to that.
Thanks a lot.
Victor
BarsSinceExit(1) works perfectly in new beta. But I still have problems with passing ddata between strategies, Signals and functions.
You said, we can use PushPop functions, but I don'e see them in EL. You also talked about EL Collections!?
Could you, Please, give any examples on how to use EL Collections or Push/Pop functions or any reference to that.
Thanks a lot.
Victor
- Stanley Miller
- Posts: 556
- Joined: 26 Jul 2005
- Has thanked: 3 times
Victor, you can find the complete information regarding the EL Collections here:
https://www.TS.com/Discussion ... c_ID=33397
I'm also attaching the documentation.
https://www.TS.com/Discussion ... c_ID=33397
I'm also attaching the documentation.
- Attachments
-
- ELCollections.doc
- (113 KiB) Downloaded 349 times