[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EL Help



PureBytes Links

Trading Reference Links

<x-flowed>
Hi Grover

The problem you have is with your else begin statement - what is happening 
is your code is correctly adjusting the JY data but the  else begin 
statement that follows then resets it back i.e if the symbol is not NG then 
set to no adjustment - re ordering your code will fix the problem - place 
the JY statement after the NG else begin statement

Regards Stuart


From: Grover Ericksen <ericksen@xxxxxxxxxxxx>
To: OmegaList <omega-list@xxxxxxxxxx>
Subject: EL Help
Date: Sun, 17 Sep 2000 15:04:28 -0700

I'm trying to export data to a .csv file but I want to apply a factor
to  the data prior to the append command. The factor varies depending on
the source.  If running the strategy on a JY chart, I want the High to
go out factored by 100, if on a NG chart I want the High to go out
factored by 10 otherwise just export the High as is.
The following EasyLanguage signal works for NG but not JY.  Any
suggestions would be appreciated.

	Input: Decimals(4) ;

	Vars:
EqName(""),TradeStr1(""),OICh(0),VolAdj(0),VarHigh(0),VarLow(0),VarClose(0),
      	   VarDecimals(0);

	Condition1=Date>ElDate(12,31,1996);
	VolAdj=Volume/1000;
	OICh=OpenInt[1]-OpenInt[2];

	If CurrentBar = 1 Then Begin
		EqName = "D:\Adata\SS\CYCLES\EXP-" + LeftStr(GetSymbolName, 2)+
".csv";
		FileDelete(EqName);
	End;

	EqName = "D:\Adata\SS\CYCLES\Exp-" + LeftStr(GetSymbolName, 2) +
".csv";

	If  LeftStr(GetSymbolName,2)="JY" then begin
		VarHigh=H*100;
		VarLow=L*100;
		VarClose=C*100;
		VarDecimals=2;
	end;
	If  LeftStr(GetSymbolName,2)="NG" then begin
		VarHigh=H*10;
		VarLow=L*10;
		VarClose=C*10;
		VarDecimals=2;
	end
	else begin
     	VarHigh=H;
		VarLow=L;
		VarClose=C;
		VarDecimals=Decimals;
     end;
	If LastBarOnChart then begin
		OICh = 0;
	    VolAdj= 0;
	End;

	TradeStr1 = ELDateToString(Date) + "," + NumToStr(VarHigh, VarDecimals)
+"," +
		  NumToStr(VarLow, VarDecimals) + "," + NumToStr(VarClose,
VarDecimals) + "," +
	      NumToStr(VolAdj,2) + "," + NumToStr(OICh,0) + "," +NewLine;



	If Condition1 then FileAppend(EqName, TradeStr1);

</x-flowed>