31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

end;

If virtmp[1] = 1 then tradeProfit

= virtBuyPrice - virtSellPrice;

If tradeProfit < 0 then lastTradeLoser

= true;

if debug then print(" Short @ ",

myFillPrice, " trade Profit" , tradeProfit);

end;

end;

if debug then print("End of Virtual Module : virTmp

= ",virTmp," ",lastTradeLoser);

for iCnt = 0 to numPyraMids-1

begin

if lastTradeLoser then

begin

if mp <> -1 and currentContracts = iCnt

* lotSize then

begin

buyPrice = hh20 + iCnt * N/2;

end;

if mp <> 1 and currentContracts = iCnt

* lotSize then

begin

sellPrice = ll20 - iCnt * N/2;

end;

virTmp = 0;

end;

if lastTradeLoser = false then

begin

if mp <> -1 and currentContracts = iCnt * lotSize then

begin

buyPrice = hh55 + iCnt * N/2;

end;

if mp <> 1 and currentContracts = iCnt * lotSize then

begin

sellPrice = ll55 - iCnt * N/2;

end;

virTmp = 0;

end;

end;

331

TRADESTATION AND EASYLANGUAGE

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!