Compile error, can someone try compile volatility indicator

Questions about MultiCharts and user contributed studies.
pipsqueek
Posts: 29
Joined: 27 Mar 2006

Compile error, can someone try compile volatility indicator

Postby pipsqueek » 14 Nov 2006

Input: p(13),s(13),f(0.5);

IF c<c[1] and c>average(c,p) Then Buy c+f*(h-l) Stop;
ExitLong at high limit;

IF c>c[1] and c<average(c,s) Then Sell c-f*(h-l) Stop;
ExitShort at low limit;

jack

pipsqueek

Postby jack » 14 Nov 2006

the code looks as if it is a signal not an indicator, correct?

pipsqueek
Posts: 29
Joined: 27 Mar 2006

Postby pipsqueek » 14 Nov 2006

Its supposed to be a volatility breakout system.

SP
Posts: 443
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 280 times

Postby SP » 15 Nov 2006

Stop and limit orders need "this bar" or "next bar".

This should work:

[code]
IF c<c[1] and c>average(c,p) Then Buy next bar at c+f*(h-l) stop;
ExitLong next bar at high limit;

IF c>c[1] and c<average(c,s) Then Sell next bar at c-f*(h-l) Stop;
ExitShort next bar at low limit;[/code]


Return to “MultiCharts”