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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

If mp <> 1 and mp[1] = 1 then

Begin

tradeProfit = ExitPrice(1) - EntryPrice(1);

lastTradeLoser = true;

If tradeProfit > 0 then lastTradeLoser = false;

if debug then

print(date," Long Trader ",tradeProfit

*bigPointValue," ",lastTradeLoser,

" ExitPrice ",ExitPrice(1):6:6," entryPrice ",

entryPrice(1):6:6);

end;

If mp <> -1 and mp[1] = -1 then

Begin

tradeProfit = EntryPrice(1) - ExitPrice(1);

lastTradeLoser = true;

If tradeProfit > 0 then lastTradeLoser = false;

if debug then

print(date," **** Short Trader ",tradeProfit

*bigPointValue," ",lastTradeLoser,

" mp ",mp," ",mp[1]);

end;

If lastTradeLoserFilter = False then lastTradeLoser = True;

If lastTradeLoser = False then

Begin

if debug then

print(date," In Virtual Section And VirtTmp = ",virTmp);

If(virtmp = 1) then

Begin

virtLongLiqPrice = maxList(lowest(low[1],

exitChanLen),virtLongLoss);

if(virtualLongExit(virtLongLiqPrice,1,

myFillPrice) =1) then

Begin

tradeProfit = myFillPrice - virtBuyPrice;

If tradeProfit < 0 then lastTradeLoser

= true;

virtmp = 0;

if debug then print(" Long Exit @ ",

myFillPrice);

end;

end;

329

TRADESTATION AND EASYLANGUAGE

www.rasabourse.com

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

Saved successfully!

Ooh no, something went wrong!