I am using the ATR Strategy and Donchian Channels on a weekly chart for long-term trading decision help. I would like to Add Labels etc for Account values etc to use for position sizing.
I understand that the highest time frame to use these account values is the daily time frame. I think that either I would like to open a DAILY chart next to my weekly chart to display GetNetLiq values to work into my position sizing calculations.
Displaying the ATR Strategy on a daily chart with the forced AggregationPeriod to WEEK would be another way to tackle the issue.
Can anyone provide some pointers as to what to change on the ATR calculations to make the aggregation period weekly on a daily chart. I understand some of the simpler examples (close, high, etc.), but can't seem to get my head around what to change on the ATR strategy.
Here is my "combined" ATR LE and LX strategy code:
input trailType = {default modified, unmodified};
input ATRPeriod = 50;
input ATRFactor = 3;
input firstTrade = {default long, short};
input averageType = AverageType.SIMPLE;
def buycondition = ATRTrailingStop(trailType, ATRPeriod, ATRFactor, firstTrade, averageType).buySignal;
addOrder(OrderType.BUY_TO_OPEN, buycondition, tickColor = GetColor(0), arrowColor = GetColor(0));
def sellcondition = ATRTrailingStop(trailType, ATRPeriod, ATRFactor, firstTrade, averageType).sellSignal;
addOrder(OrderType.SELL_TO_CLOSE, sellcondition, tickColor = GetColor(1), arrowColor = GetColor(1));
=====
Any help would be greatly appreciated. Thanks, Jeff
I understand that the highest time frame to use these account values is the daily time frame. I think that either I would like to open a DAILY chart next to my weekly chart to display GetNetLiq values to work into my position sizing calculations.
Displaying the ATR Strategy on a daily chart with the forced AggregationPeriod to WEEK would be another way to tackle the issue.
Can anyone provide some pointers as to what to change on the ATR calculations to make the aggregation period weekly on a daily chart. I understand some of the simpler examples (close, high, etc.), but can't seem to get my head around what to change on the ATR strategy.
Here is my "combined" ATR LE and LX strategy code:
input trailType = {default modified, unmodified};
input ATRPeriod = 50;
input ATRFactor = 3;
input firstTrade = {default long, short};
input averageType = AverageType.SIMPLE;
def buycondition = ATRTrailingStop(trailType, ATRPeriod, ATRFactor, firstTrade, averageType).buySignal;
addOrder(OrderType.BUY_TO_OPEN, buycondition, tickColor = GetColor(0), arrowColor = GetColor(0));
def sellcondition = ATRTrailingStop(trailType, ATRPeriod, ATRFactor, firstTrade, averageType).sellSignal;
addOrder(OrderType.SELL_TO_CLOSE, sellcondition, tickColor = GetColor(1), arrowColor = GetColor(1));
=====
Any help would be greatly appreciated. Thanks, Jeff