# Required AFL for Options Writing

#### zodix

##### Member
Hi Friends,
Can anyone develop for me an AFL to plot the following in line chart:
1) Plot Line Chart of Average price of a paired Options, i.e. (Call Price+Put Price) /2 of a given set of strike price of a given underling.
2) Plot EMA (x) of the above Average Price. (where x is definable)

Amibroker 6.20.1
Live Options data from Truedata.

-Vijay Arora

##### New Member
Hi Friends,
Can anyone develop for me an AFL to plot the following in line chart:
1) Plot Line Chart of Average price of a paired Options, i.e. (Call Price+Put Price) /2 of a given set of strike price of a given underling.
2) Plot EMA (x) of the above Average Price. (where x is definable)

Amibroker 6.20.1
Live Options data from Truedata.

-Vijay Arora
Pl find below the code, Shall I Know the strategy?

Cl7=colorYellow;
Cl8=colorBlue;

FB = C;
//Select Tickers
Fn0=ParamStr( "FC", " 9600CE ");
Fn1=ParamStr( "FP", " 9600PE ");

F0=ValueWhen(FB,Foreign(F0,"C"));
F1=ValueWhen(FB,Foreign(F1,"C"));

diff=F1-F0;
EM1=EMA(diff,8);

Plot(diff,F1,Cl7,4);

Plot(EM1,F1,Cl8,4);

##### Well-Known Member
Pl find below the code, Shall I Know the strategy?

Cl7=colorYellow;
Cl8=colorBlue;

FB = C;
//Select Tickers
Fn0=ParamStr( "FC", " 9600CE ");
Fn1=ParamStr( "FP", " 9600PE ");

F0=ValueWhen(FB,Foreign(F0,"C"));
F1=ValueWhen(FB,Foreign(F1,"C"));

diff=F1-F0;
EM1=EMA(diff,8);

Plot(diff,F1,Cl7,4);

Plot(EM1,F1,Cl8,4);

Cl7=colorYellow;
Cl8=colorBlue;

//Select Tickers
Fn0=Foreign( "CALL STRIKE", "C" ) ;
Fn1=Foreign( "PUT STRIKE", "C" ) ;

diff=(Fn1+Fn0)/2;
EM1=EMA(diff,8);

Plot(diff,"",Cl7,4);

Plot(EM1,"",Cl8,4);

This is straddle , go long or go short.
whats exactly the strategy