No, I don't play golf.

System Coding
Code
Code Code Code Code Code Code Code Code Code Code Code Code 

No, I don't play golf.


Trading    

 


var EntryRule, ExitRule: integer;

EntryRule := #Var1;
ExitRule := #Var2;

for Bar := 20 to
BarCount - 1 do
begin
{ Entry rules }
  case EntryRule of
  1:
    if something > somethingelse then
      
BuyAtMarket(Bar+1, '1');
  2:
    if something2 < somethingelse3 then
      
BuyAtMarket(Bar+1, '2');
  { etc }
  10:
    if something4 > somethingelse5 then
      
BuyAtMarket(Bar+1, '10');
  end;
{ Exit rules }
  if
PositionActive....

  case ExitRule of
  1:
    if something6 < somethingelse7 then
      
SellAtMarket(Bar+1, 'X1');
  2:
    if something8 < somethingelse9 then
      
SellAtMarket(Bar+1, 'X2');
  { etc }
  10:
    if somethingA > somethingelseB then
      
SellAtMarket(Bar+1, 'X10');
  end;

end;
 

 

back to top


© Copyright:
Thomas Pflügl 1998 - 2021

Last updated: März 25, 2021
 
All rights reserved.