logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Gerrit  
#1 Posted : Tuesday, October 18, 2005 7:23:06 AM(UTC)
Gerrit

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/18/2005(UTC)
Posts: 25

Hi. Does anyone have a way of using a symbol or security name inside a condition in an expert advisor? So for example: writeif(<symbol> = "$$USDJPY", blabla) At the moment the expert advisor does not like the above syntax with the constant being used in the condition. Before anyone asks why :roll: I am doing this because my expert is optimised for each security in a certain way, and I would like to have one expert with all the code, only listing the information relevant to the security currently being viewed. Thanks Gerrit
ravik  
#2 Posted : Saturday, September 12, 2009 9:37:40 AM(UTC)
ravik

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 9/12/2009(UTC)
Posts: 6

hi Gerrit,

I have the same requirement, could you get a solution?


ravi
Data  
#3 Posted : Saturday, September 12, 2009 12:05:08 PM(UTC)
Data

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 5/20/2008(UTC)
Posts: 53

There is no direct way to do that but I think it's quite easy to do as long as you are using your expert on a daily chart.

Just use :
If(C = security("ONLINE:$$usdjpy",C) , blabla, no blabla)



That being said, I've never used the "Security" function and I'm not sure i've used it correctly but I think you've got the idea !
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.