AFL codeing help needed

#1
//Afl to show stock open greater than close & profit amount
Filter=Open>Close;
gain=Open-Close;
AddTextColumn(FullName(),"StockName");
AddColumn(Open,"Open");
AddColumn(Close,"Close");
AddColumn(gain,"Gain",1.4,colorGreen);

i want previous day close minus today close so we will get todays stock profit
 

jagankris

Well-Known Member
#2
//Afl to show stock open greater than close & profit amount
Filter=Open>Close;
gain=Open-Close;
AddTextColumn(FullName(),"StockName");
AddColumn(Open,"Open");
AddColumn(Close,"Close");
AddColumn(gain,"Gain",1.4,colorGreen);

i want previous day close minus today close so we will get todays stock profit
TimeFrameSet( inDaily );
PreClose = ref(Close-1);
timeframerestore();

Filter=Open > PreClose;
gain=PreClose-Close;
AddTextColumn(FullName(),"StockName");
AddColumn(Open,"Open");
AddColumn(PreClose,"PreClose");
AddColumn(Close,"Close");
AddColumn(gain,"Gain",1.4,colorGreen);

Try this.
 

Similar threads

Trade in Rs 20, No more % brokerage

Name:Phone:
Email:City:
State:
Are you a day trader?