Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 06:22:57 +0000



Post From: Do I need to use 2 independent STUDIES?

[2017-02-03 05:02:36]
User701247 - Posts: 117
Referring to following coding, I would like to know on how to assign a LEFT_variable and RIGHT_variable within SubgraphIndex in order to classify LEFT or RIGHT on showing colors.

Is there any given sample similar to this situation? or
Do I have to separate LEFT and RIGHT into 2 independent STUDIES? and apply them into chart?

Do you have any suggestions?
Thanks you very much for any suggestions

========================================================================================

for (int SubgraphIndex = 0; SubgraphIndex < SC_SUBGRAPHS_AVAILABLE - 1; ++SubgraphIndex)
{ How to assign variable HERE for ConditionMet_LEFT?
...
sc.Subgraph[SubgraphIndex].DrawStyle = DRAWSTYLE_SQUARE_OFFSET_LEFT_BODY;
...
}

for (int SubgraphIndex = 0; SubgraphIndex < SC_SUBGRAPHS_AVAILABLE - 1; ++SubgraphIndex)
{ How to assign variable HERE for ConditionMet_RIGHT?
...
sc.Subgraph[SubgraphIndex].DrawStyle = DRAWSTYLE_SQUARE_OFFSET_RIGHT_BODY;
...
}

ConditionMet_LEFT = false;
if (p_VolumeAtPrice->AskVolume < p_VolumeAtPrice->BidVolume )
ConditionMet_LEFT = true;

ConditionMet_RIGHT = false;
if (p_VolumeAtPrice->AskVolume > p_VolumeAtPrice->BidVolume )
ConditionMet_RIGHT = true;

if (ConditionMet_LEFT)
sc.Subgraph[AvailableSubgraphIndex][BarIndex] = Price; <<< How to show color on LEFT side for ConditionMet_LEFT?

if (ConditionMet_RIGHT)
sc.Subgraph[AvailableSubgraphIndex][BarIndex] = Price; <<< How to show color on RIGHT side for ConditionMet_RIGHT?