Just want to find out why I can not do this simple program which monitors what each bar is doing in the big 4 Stock Index Futures at any one time, i.e. /ES,/YM,/NQ,/RTY in the 1m Bar by creating a little AddLabel that by its # let me know what each are doing while I am on just One Chart. How would a trained programmer in ToS do it?
Here is the Study that does not work. If there is a beginner place I need to post, let me know that.
Here is the Study that does not work. If there is a beginner place I need to post, let me know that.
Code:
#ADLIndGrade1mGreenAddLabelStudy--- Does not Work on 1m or 1m- Does not work!
declare upper;
# 1m Bar in Formation across all 4 Indices
# Green
def Green1mES = close("/ES", AggregationPeriod.MIN)[0] >= open("/ES, AggregationPeriod.Five_Min ")[0];
def Green1mYM = close("/YM", AggregationPeriod.MIN)[0] >= open("/YM, AggregationPeriod.Five_Min ")[0];
def Green1mNQ = close("/NQ", AggregationPeriod.MIN)[0] >= open("/NQ, AggregationPeriod.Five_Min ")[0];
def Green1mRTY = close("/RTY", AggregationPeriod.MIN)[0] >= open("/RTY, AggregationPeriod.Five_Min ")[0];
############### AddLabel Assignments per Each Permutation of 4 ##############
AddLabel(Green1mES && Green1mYM && Green1mNQ && Green1mRTY, "IndicesGrade= "+8, GetColor(5));
#######
AddLabel(Green1mES && Green1mYM && Green1mNQ && !Green1mRTY, "IndicesGrade= " + 6, GetColor(5));
AddLabel(Green1mES && Green1mYM && !Green1mNQ && Green1mRTY, "IndicesGrade= " + 6, GetColor(5));
AddLabel(Green1mES && !Green1mYM && Green1mNQ && Green1mRTY, "IndicesGrade= " + 6, GetColor(5));
AddLabel(!Green1mES && !Green1mYM && Green1mNQ && Green1mRTY, "IndicesGrade= " + 6, GetColor(5));
######
AddLabel(!Green1mES && !Green1mYM && Green1mNQ && Green1mRTY, "IndicesGrade= " + 4, GetColor(5));
AddLabel(!Green1mES && Green1mYM && !Green1mNQ && Green1mRTY, "IndicesGrade= " + 4, GetColor(5));
AddLabel(!Green1mES && Green1mYM && Green1mNQ && !Green1mRTY, "IndicesGrade= " + 4, GetColor(5));
AddLabel(Green1mES && !Green1mYM && !Green1mNQ && Green1mRTY, "IndicesGrade= " + 4, GetColor(5));
AddLabel(Green1mES && !Green1mYM && Green1mNQ && !Green1mRTY, "IndicesGrade= " + 4, GetColor(5));
AddLabel(Green1mES && Green1mYM && !Green1mNQ && !Green1mRTY, "IndicesGrade= " + 4, GetColor(5));
######-2
#######
AddLabel(!Green1mES && !Green1mYM && !Green1mNQ && Green1mRTY, "IndicesGrade= " + 2, GetColor(5));
AddLabel(!Green1mES && !Green1mYM && Green1mNQ && !Green1mRTY, "IndicesGrade= " + 2, GetColor(5));
AddLabel(!Green1mES && Green1mYM && !Green1mNQ && !Green1mRTY, "IndicesGrade= " + 2, GetColor(5));
AddLabel(Green1mES && !Green1mYM && !Green1mNQ && !Green1mRTY, "IndicesGrade= " + 2, GetColor(5));
#####0
AddLabel(!Green1mES && !Green1mYM && !Green1mNQ && !Green1mRTY, "IndicesGrade= "+0, GetColor(5));
Last edited by a moderator: