OmniTrader Professional Forum OmniTrader Professional 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 Professional Forum
OmniScripts
indicator of wave trader as a signal
Last Activity 9/1/2024 11:18 PM
16 replies, 1308 viewings

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

^ Top
beech pilot

Member
25
Posts: 36

Joined: 11/1/2018
Location: Visalia

User Profile
 
Subject : indicator of wave trader as a signal
Posted : 4/16/2022 9:52 AM
Post #31998

would like to add to the indicator when the ema 9 crosses the pricetrendline as a system as of now the indicator plots a price and bar when the wave changes color, i would like to change it as a indicator into a system thanks
#Indicator

dim s as string

s = cstr(c[1])

If (CAW_ZZ(2.5,14) > 0 and CAW_ZZ(2.5,14)[1] < 0) then
PlotText("WTChange", C-(2*ATR(14)), s)
PlotPriceTrendLine( "Level", BAR, Close, BAR+20, close, blue, 3)

Else If (CAW_ZZ(2.5,14) < 0 and CAW_ZZ(2.5,14)[1] > 0)then
PlotText("WTChange", c+(2*ATR(14)), s)
PlotPriceTrendLine( "Level", BAR, Close, BAR+20, close, blue, 3)

End If

Return 0 ' Return the value calculated by the indicator


[Edited by beech pilot on 4/16/2022 9:59 AM]

Attached file : 4-16-2022 7-42-40 AM.jpg (182KB - 233 downloads)

^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 10:40 AM
Post #31999 - In reply to #31998

I couldn’t really follow the first part of your post - sort of garbled. But here’s how you change the indicator you provided into a system. Maybe that will get you started.


#system

dim s as string

s = cstr(c[1])

If (CAW_ZZ(2.5,14) > 0 and CAW_ZZ(2.5,14)[1] < 0) then
PlotText("WTChange", C-(2*ATR(14)), s)
PlotPriceTrendLine( "Level", BAR, Close, BAR+20, close, blue, 3)
Signal = LongSignal

Else If (CAW_ZZ(2.5,14) < 0 and CAW_ZZ(2.5,14)[1] > 0)then
PlotText("WTChange", c+(2*ATR(14)), s)
PlotPriceTrendLine( "Level", BAR, Close, BAR+20, close, blue, 3)
Signal = ShortSignal

End If



[Edited by Jim Dean on 4/16/2022 10:43 AM]

^ Top
beech pilot

Member
25
Posts: 36

Joined: 11/1/2018
Location: Visalia

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 10:54 AM
Post #32000 - In reply to #31998

Thanks Jim. however it will not compile here is what i get
Attached file : 4-16-2022 8-53-53 AM.jpg (47KB - 216 downloads)

^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 12:47 PM
Post #32001 - In reply to #32000

Please use the corrected code. Was still waking up when I first posted. Sorry about that.
^ Top
beech pilot

Member
25
Posts: 36

Joined: 11/1/2018
Location: Visalia

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 12:57 PM
Post #32002 - In reply to #32001

Thanks Jim is it possible to get the longsignal to occur when the ema9 > pricetrendline and short signal when ema9 < pricetrendline pic included
Attached file : 4-16-2022 10-55-19 AM.jpg (57KB - 218 downloads)
Attached file : 4-16-2022 10-55-19 AM.jpg (57KB - 195 downloads)

^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 1:21 PM
Post #32003 - In reply to #31999

I don’t recall the syntax for “pricetrendline” - not sure what plug-in it comes from. But here is “pseudocode” for what you asked - you’ll need to replace pricetrendline with whatever syntax and params you prefer.

#system

dim s as string

s = cstr(c[1])

If (CAW_ZZ(2.5,14) > 0 and CAW_ZZ(2.5,14)[1] < 0 and EMA(9) > pricetrendline ) then
PlotText("WTChange", C-(2*ATR(14)), s)
PlotPriceTrendLine( "Level", BAR, Close, BAR+20, close, blue, 3)
Signal = LongSignal

Else If (CAW_ZZ(2.5,14) < 0 and CAW_ZZ(2.5,14)[1] > 0 and EMA(9) < pricetrendline ) then
PlotText("WTChange", c+(2*ATR(14)), s)
PlotPriceTrendLine( "Level", BAR, Close, BAR+20, close, blue, 3)
Signal = ShortSignal

End If



^ Top
beech pilot

Member
25
Posts: 36

Joined: 11/1/2018
Location: Visalia

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 2:09 PM
Post #32004 - In reply to #31998

the pricetrendline is the horizontal blue line. PlotPriceTrendLine( "Level", BAR, Close, BAR+20, close, blue, 3) unfortunately i dont know what that would be to give it that condition
^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 2:53 PM
Post #32005 - In reply to #32003

Ah ok. Simple. That line is just at the closing price of the current bar.

#system

dim s as string

s = cstr(c[1])

If (CAW_ZZ(2.5,14) > 0 and CAW_ZZ(2.5,14)[1] < 0 and EMA(9) > C ) then
PlotText("WTChange", C-(2*ATR(14)), s)
PlotPriceTrendLine( "Level", BAR, Close, BAR+20, close, blue, 3)
Signal = LongSignal

Else If (CAW_ZZ(2.5,14) < 0 and CAW_ZZ(2.5,14)[1] > 0 and EMA(9) < C ) then
PlotText("WTChange", c+(2*ATR(14)), s)
PlotPriceTrendLine( "Level", BAR, Close, BAR+20, close, blue, 3)
Signal = ShortSignal

End If

[Edited by Jim Dean on 4/16/2022 2:53 PM]

^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 2:56 PM
Post #32006 - In reply to #32005

Please note that your snapshot captions appear to be BACKWARDS from what the signal triangle is indicating.
If you want the code to match your drawing and not your posted description, reverse the > and < in the EMA(9) clauses.
^ Top
beech pilot

Member
25
Posts: 36

Joined: 11/1/2018
Location: Visalia

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 3:00 PM
Post #32007 - In reply to #32005

unfortunately still not correct
Attached file : 4-16-2022 12-59-12 PM.jpg (81KB - 201 downloads)
Attached file : 4-16-2022 12-59-12 PM.jpg (81KB - 191 downloads)

^ Top
beech pilot

Member
25
Posts: 36

Joined: 11/1/2018
Location: Visalia

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 3:02 PM
Post #32008 - In reply to #32006

ok i will try this
^ Top
beech pilot

Member
25
Posts: 36

Joined: 11/1/2018
Location: Visalia

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 3:14 PM
Post #32009 - In reply to #32008

systems arrows do not plot at the blue line when ema9 > or < the C or blue line they plot at wave change still
^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 5:51 PM
Post #32010 - In reply to #32009

I can’t decipher what you are saying.

Why not try modifying the code yourself a bit?
^ Top
beech pilot

Member
25
Posts: 36

Joined: 11/1/2018
Location: Visalia

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/16/2022 8:25 PM
Post #32011 - In reply to #32010

thanks Jim for the help what you have done i will seek another avenue to get this finished,
^ Top
Ryan Olson

Veteran
1002525
Posts: 170

Joined: 12/29/2006
Location: Austin, Tx

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/18/2022 4:46 PM
Post #32012 - In reply to #31998


Beech Pilot -

I think I get what you are looking for - some of this was a bit confusing as PlotPrice is only a visual plot however, since it was using the close price of the “Color Change” bar, we simply need to store that in a variable to be used later.

Hope this helps.


#system

#Param "Extend", 3
#Param "Periods", 9
dim level as single
dim s as string

s = cstr(c[1])

if CAW_ZZ(2.5,14) = -1 and CAW_ZZ(2.5,14)[1] = 1 then
level = C
PlotPriceTrendLine( "Level", BAR, Close, BAR+Extend, close, blue, 3)
End if

If CAW_ZZ(2.5,14) = -1 and EMA(Periods) > level and EMA(Periods)[1] < level then
PlotText("WTChange", C-(2*ATR(14)), s)
Signal = LongSignal
end if

if CAW_ZZ(2.5,14) = 1 and CAW_ZZ(2.5,14)[1] = -1 then
level = C

PlotPriceTrendLine( "Level", BAR, Close, BAR+Extend, close, blue, 3)
End if

If CAW_ZZ(2.5,14) = 1 and EMA(Periods) < level and EMA(Periods)[1] > level then
PlotText("WTChange", C-(2*ATR(14)), s)
Signal = ShortSignal
end if

Plotprice("EMA", EMA(Periods), blue, 3)


^ Top
beech pilot

Member
25
Posts: 36

Joined: 11/1/2018
Location: Visalia

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 4/18/2022 9:12 PM
Post #32013 - In reply to #31998

100 percent what i needed . You nailed it perfectly Ryan. Obviously the pics were very straight forward thanks a ton
^ Top
nawaz

New User

Posts: 2

Joined: 5/16/2016
Location: SURREY BC CANADA

User Profile
 
Subject : RE: indicator of wave trader as a signal
Posted : 9/1/2024 11:18 PM
Post #32483 - In reply to #31998

thank you
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.