Jump to content

Capind

Members
  • Posts

    1
  • Joined

  • Last visited

Capind's Achievements

0

Reputation

  1. Hi I have a ATR stop loss indicator that works fantastic in Metastock, and i want to know if anyone can assist me to re-code it for Prorealtime? ATR Stop Long InpMonth:=Input("Month",1,12,1); InpDay:=Input("Day",1,31,2); InpYear:=Input("Year",1800,2050,2020); InitStop:=Input("Initial Stop Price",0.1,20000,10); atrper:=Input("ATR period :",1,100,5); atrfact:=Input("ATR multiplication :",1,10,2); loss:=atrfact*ATR(atrper); EntryLong:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth(); EntryLock:=If(Ref(EntryLong,-1)=0 AND EntryLong=1,1,PREV); support:=C-loss; TrailStopLong:= If(EntryLock=0 OR EntryLong=1,InitStop, If(support>Ref(Support,-1),Max(support,PREV),PREV)); TrailStopLong ATR Stop Short InpMonth:=Input("Month",1,12,1); InpDay:=Input("Day",1,31,2); InpYear:=Input("Year",1800,2050,2020); InitStop:=Input("Initial Stop Price",0.1,20000,10); atrper:=Input("ATR period :",1,100,5); atrfact:=Input("ATR multiplication :",1,10,2); loss:=atrfact*ATR(atrper); EntryLong:= InpYear=Year() AND InpMonth=Month() AND InpDay=DayOfMonth(); EntryLock:=If(Ref(EntryLong,-1)=0 AND EntryLong=1,1,PREV); support:=C+loss; TrailStopShort:= If(EntryLock=0 OR EntryLong=1,InitStop, If(support>Ref(Support,-1),Min(support,PREV),PREV)); TrailStopShort
×
×
  • Create New...
us