Australian (ASX) Stock Market Forum

Reply to thread

Another tip that I've had some success with this week. When you're writing or testing a strategy - its good to output your buy/sell conditions and values to the explore columns. That way you verify the triggers for yourself.


I discovered this while testing a strategy, and I couldn't understand why I wasn't getting buy triggers for months on end. So I added columns to the explore output for each of the buy conditions. Then I could check why the buy wasn't being triggered.


To illustrate this, lets say you have:

  1. an index filter which is true or false, based on the market index being in an uptrend.
  2. A buy condition where the close needs to be above the 40 day EMA =of the stock

Add code like this to output values to your explore results.

AddColumn( indexFilter, "Weekly Index filter", 1 );

AddColumn( cond1, "Condition 1", 1 );

AddColumn( EMA ( C, 40), "40 day EMA", 1 );


You can see below that the output lets you see exactly which part of the trigger is and isn't being met.


[ATTACH=full]108649[/ATTACH]


Top