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.

330

TRADESTATION AND EASYLANGUAGE

If(virtmp = -1) then

Begin

virtShortLiqPrice = minList(highest(high[1],

exitChanLen),virtShortLoss);

if(virtualShortExit(virtShortLiqPrice,1,

myFillPrice) =1) then

Begin

tradeProfit = virtSellPrice

- myFillPrice;

If tradeProfit < 0 then lastTradeLoser

= true;

virtmp = 0;

if debug then print(" ShortExit @ ", myFillPrice);

end;

end;

if(virtualBuy(highest(high[1],entryChanLen),1,

myFillPrice) = 1) then

Begin

if virtmp <> 1 then

begin

virtBuyPrice = myFillPrice;

virtLongLoss = myFillPrice

- stopLossPts;

virtmp = 1;

tradeProfit = 0;

If virtmp[1] = -1 then tradeProfit

= virtSellPrice - virtBuyPrice;

If tradeProfit < 0 then lastTradeLoser = true;

if debug then print(" Long @ ",

myFillPrice);

end;

end;

if(virtualSell(lowest(low[1],entryChanLen),1,

myFillPrice) = 1) then

Begin

if virtmp <> -1 then

begin

virtsellPrice = myFillPrice;

virtShortLoss = myFillPrice

+ stopLossPts;

virtmp = -1;

tradeProfit = 0;

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!