Ghost System

Ghost System

The code for the Ghost Trader is designed more as a template than a complete trading strategy. Some trading strategies incorporate the success of the last trade signal in the calculation/determination of the next trade signal. We have tested several methodologies that only initiate new positions after a losing trade.

Some traders feel that there exists a high probability of failure on the next trade signal if the last trade was closed out with a profit. This approach is much easier to trade than historically back test. It’s easy to keep track of your trades and then skip the hypothetical trades that don’t meet your criteria.

In our example of waiting for a losing trade before initiating a new trade, you would simply stop trading your account after a winning trade and start paper trading and wait until you have a loser on paper. Once a paper loser occurs, the next trade would be initiated in the real world. The code for Ghost Trader demonstrates how to keep track of simulated trades and only issue the trades that meet a certain criteria.

The core trading strategy of the Ghost Trader is based off of an exponential
moving average and a RSI indicator.
if(marketPosition = 0 and myProfit < 0 and Xaverage(Close,9) >
Xaverage(High,19) and
RSI(Close,9) crosses below 70) then
buy next bar at High stop;
if(marketPosition = 0 and myProfit < 0 and Xaverage(Close,9) <
Xaverage(Low,19) and
RSI(Close,9) crosses above 30) then
sellShort next bar at Low stop;

Long positions are initiated on the next day at today’s high on a stop order.This order is only issued if the nine day exponential moving average of closes is greater than the 19 day exponential moving average of high prices and the nine day RSI of closing prices is crossing from above to below the 70 reading.

Short positions are initiated in just the opposite fashion. Long positions are liquidated if today’s market action penetrates the lowest low of the past 20 days and short positions are liquidated if today’s market action penetrates the highest high of the past 20 days.

These entry/exit techniques are interesting but are not the main focus of the Ghost Trader. The main focus of the Ghost Trader is to keep track of a trading system and issue only the trade signals that meet a certain criteria. In our case, actual trade signals should only be issued after a real or simulated losing trade. The following code keeps track of all trades—real and simulated.


To read More,Please download the book.



Similar Videos and E-books

user image
Reply alan Says
2 3

some say it works,some say it doesnt.



All Books

Alert Header

Alert Message