Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 9/2/2006 Posts: 12
|
This works as expected when used as a scan and chart condition MyCondition is hard coded
'# MC = chartCondition.MyCondition
If Me.isLastBar AndAlso MC.value Then
pass
Me.ShowMessage(" MC Buy " & Me.currentsymbol & " Tomarrow At " & (price.High + .125)& " Limit" )
End If
How can I create an Alert as a condition that I can drag any combo Condition onto and get the alert without the need to hard code each one.
Also how can i use (price.High + .125) and limit the number of decimal places to two.
Thanks
|
|
Registered User Joined: 12/31/2005 Posts: 2,499
|
QUOTE (biseniusr)
Also how can i use (price.High + .125) and limit the number of decimal places to two.
Thanks
dim entryPrice as single
If Me.isLastBar AndAlso MC.value Then
pass
entryPrice = price.High + 0.125
Me.ShowMessage(" MC Buy " & _
Me.currentsymbol & _
" Tomorrow At " & _
entryPrice.tostring("0.00") & " Limit" )
End If
|
|
Registered User Joined: 9/2/2006 Posts: 12
|
Thanks works as expected, is it possable to write a universal alert that any condition and can be dragged on to.
|
|
Registered User Joined: 12/31/2005 Posts: 2,499
|
If I'm understanding your question this code will work fine. Just drag the condition of choice and then change the name to SomeCondition
'# SomeCondition = chartCondition.WhateverConditionYouDrag
dim entryPrice as single
If Me.isLastBar AndAlso SomeCondition.value Then
pass
entryPrice = price.High + 0.125
Me.ShowMessage(" MC Buy " & _
Me.currentsymbol & _
" Tomorrow At " & _
entryPrice.tostring("0.00") & " Limit" )
End If
|
|
Registered User Joined: 9/2/2006 Posts: 12
|
Thanks for the guidance works great
|
|
Guest-1 |