OmniTrader Forum OmniTrader Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Archives
OmniTrader 2020 Technical Support
Omniscript Stop with $SPX
Last Activity 5/10/2021 4:44 AM
1 replies, 789 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
gottfried

Veteran
100
Posts: 103

Joined: 12/17/2003
Location: Biel/Bienne Switzerland

User Profile
 
Subject : Omniscript Stop with $SPX
Posted : 9/15/2020 7:56 AM
Post #47505

I would like to make a stop on a stock symbol when a condition in $SPX is reached.
For instance sell all when Price ($SPX) is crossed lower then MA20.
How can I tell the system this stop is only for the index $SPX.

I would like to sell the position when the overall situation changes
^ Top
Jim Dean

Sage
20001000
Posts: 3022

Joined: 9/21/2006
Location: L'ville, GA

User Profile
 
Subject : RE: Omniscript Stop with $SPX
Posted : 9/15/2020 8:47 AM
Post #47507 - In reply to #47505

If you are trying to exit a trade on some other symbol than $SPX, then in OLang, you assign a variable to GetClose(“$SPX”), and use that variable in your calcs for the stop conditions, in place of Close. (Similar GetHigh, GetLow, GetOpen, GetVolume).

Most native OT functions allow “overloading” the param list so you can spec the use of any variable rather than the default C. To see this, in the OLang editor, type the name of the function and open paren … a help popup will appear, usually with more than one option, showing the param’s the function uses.

If you don’t have OT Pro, then you can do this in OScript as well without assigning a variable - just write out the GetClose(…) expression longhand.

[Edited by Jim Dean on 9/15/2020 8:49 AM]

Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.