Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
The easy way is to copy the indicator and add the buy condition. Then you can use the indicator directly or use FML to call it from the Expert Symbol tab.
If you want to change "LookBack", you, must change the default in the indicator -- you can't use "Input" in an Expert, Exploration or System Test. If you want to put it directly in the Expert, replace the "Input" code line with "Lookback:=10;".
To use the indicator directly, just drag it into the chart. I'd suggest changing the line style to vertical bars and using a different color for Buy vs. Sell; it's a quick way to see if the code is doing what you want and you can double-click to edit/change the parameters or code -- before using it elsewhere.
{ NAME: _GameTime Buy Close over resistance and MACD } LookBack := Input("Look Back Periods",1,1000,10); Resistance :=ValueWhen(1,Cross(Mov(C, LookBack, S),C),HHV(H, LookBack));
C>Resistance AND Cross(MACD(),Mov(MACD(),9,EXPONENTIAL))
{ NAME: _GameTime Sell Close under support and MACD } LookBack := Input("Look Back Periods",1,1000,10); Support :=ValueWhen(1,Cross(C,Mov(C, LookBack, S)),LLV(L, LookBack));
C<Support AND Cross(Mov(MACD(),9,EXPONENTIAL),MACD())
***************** EXPERT -- Symbol tab
BUY: Fml("_GameTime Buy") SELL: Fml("_GameTime Sell")
|