|
|||||||||||||||||||
| Special offer: buy AmiBroker and EOD+Real-Time Data |
|
Volatility Breakout System Commission:=21; {for Buy+Sell+Stop} TradeAmt:=10000; Buy:=O+((Ref(H,-1)-Ref(C,-1))*.7); Sell:=C; Stop:=O; Trade:= O < Ref(C,-1) AND H > Buy AND Ref(C,-1) < Ref(C,-2) AND Ref(C,-2) < Ref(C,-3) AND Ref(C,-3) < Ref(C,-4); {Trigger for Trade} HitStop:= If(Trade AND Stop>=Sell,TRUE,FALSE); {Have we hit our Stop} TradeSize:= TradeAmt/Buy; Profit:=If(Trade,-Commission-TradeSize*Buy,0);{Purchase} Profit:=If(HitStop=TRUE,{then} Profit+Stop*TradeSize, {else} If(Trade AND HitStop=FALSE, {then} Profit+Sell*TradeSize,0)); {Sale} Win:=If(Profit>0,1,0); Loss:=If(Profit<0,1,0); Cum(Profit) The indicator charts your profit. You just have to set the first 6 variablesas per your system. The MS If structures are a pain and I'm sure there mustbe easier ways to do this. This is also my first attempt to prove if it works. If you then create an Expert Advisor with the following in the Commentary definition, you'll get some summary statistics for the system. Code:
all formulas for MetaStock all formulas
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators and systems are submitted by anonymous users. Therefore S4T™ does not take any responsibility for it's quality. If you use any of this information, use it at your own risk. You are responsible for your own trading decisions. Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade. In no case will S4T™ be responsible for your trading gains or losses. |
|
|