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

Re: EasyLanguage Question



PureBytes Links

Trading Reference Links

Better to keep the entry name and exit name separate for report
consideration.

dbs

vars:SigVal(0),ESigName(""),EntryP(0),ExitP(0),Profit(0),PF(0),
MP(0),XSigName("");

MP=MarketPosition;

If {Buy Setup Conditions} and SigVal<>1 then begin
    if  PF >= 2.0 then Buy("MyBuy") at Market;
    SigVal=1;EntryP=C;ESigName="MyBuy";
end;

if reason to exit then begin
  if SigVal=1 then begin
    if  MP=1 then EXITLONG("MyBExit") at Market;
    ExitP=C;Profit=ExitP-EntryP;XSigName="MyBExit");
    {...Calculate and print whatever values you want in the report...}
    SigVal=0;
  end;



"david b. stanley" wrote:

> vars:SigVal(0),SigName(""),EntryP(0),ExitP(0),Profit(0),PF(0),
> MP(0);
>
> MP=MarketPosition;
>
> If {Buy Setup Conditions} and SigVal<>1 then begin
>     if  PF >= 2.0 then Buy("MyBuy") at Market;
>     SigVal=1;EntryP=C;SigName="MyBuy";
> end;
>
> if reason to exit then begin
>   if SigVal=1 then begin
>     if  MP=1 then EXITLONG("MyBExit") at Market;
>     ExitP=C;Profit=ExitP-EntryP;SigName="MyBExit");
>     {...Calculate and print whatever values you want in the report...}
>     SigVal=0;
>   end;
>
> dbs
>
> Ian MacAuslan wrote:
>
> > I'm loading "ProfitFactor" into a variable, so I can keep track of how
> > it changes with each subsequent trade that is generated.
> >
> > My thinking is, I'd like to use it as an additional setup -- of the form
> >
> > If {Buy Setup Conditions} AND PF >= 2.0 then
> >     Buy at Market;
> >
> > My problem is, once PF falls below 2, it won't generate any more trades
> > -- the system shuts off.  It seems to me the answer would be to have it
> > always on in "phantom mode" generating phantm trades for the purposes of
> > calculating PF.
> >
> > Does any EasyLanguage guru out there have an idea how I might do this?
> > Unfortunately, there isn't a "BuyPhantom" function.
> >
> > Thankyou!