Hello- I have lurked for years and utilized this forum in the bg, I am posting as I cannot find an answer.
I am trying to have different param values depending on the Index ETF I day trade as I have a service that provided key daily value lines, however SPX and SPY values are so very different I can't get it to cooperate. I saw some code by fxshrat (who is AWESOME at this !!) thinking this may be the solution , unsure...
their code first... then mine..
thanks in advance..
E17
if ( Status( "action" ) == actionIndicator ) { // if in chart pane
pval = Param( pname, def, start, end, change);
StaticVarSet(pname + uniqueID, pval );
VolTrigger = Param("Vol Trigger",400,400,500,1);
AbsGEX = Param("AbsGEX",VolTrigger+1,VolTrigger,500,1);
CallWall = Param("CallWall",VolTrigger+10,VolTrigger,500,1);
PutWall = Param("PutWall",VolTrigger-10,VolTrigger,500,1);
} else // call chart pane value (if analysis)
pval = StaticVarGet( pname + uniqueID );
CurrentSymbol = Name();
//printf(currentsymbol);
if( CurrentSymbol == "SPY")
{
VolTrigger = Param("Vol Trigger",400,400,500,1);
AbsGEX = Param("AbsGEX",VolTrigger+1,VolTrigger,500,1);
CallWall = Param("CallWall",VolTrigger+10,VolTrigger,500,1);
PutWall = Param("PutWall",VolTrigger-10,VolTrigger,500,1);
Plot(VolTrigger,"Vol Trigger",colorBlack,styleLine,VolTrigger,Null,1,Null,3);
Plot(AbsGEX,"Abs GEX",colorBlack,styleDashed,AbsGEX,Null,1,Null,4);
Plot(CallWall,"CallWall",colorCUSTOM16,styleThick|styleLine,CallWall,Null,1,Null,4);
Plot(PutWall,"PutWall",colorDarkGreen,styleThick|styleLine,PutWall,Null,1,Null,4);
}
else if (CurrentSymbol == "QQQ")
{
VolTrigger = Param("Vol Trigger",300,300,500,1);
AbsGEX = Param("AbsGEX",VolTrigger+1,VolTrigger,500,1);
CallWall = Param("CallWall",VolTrigger+10,VolTrigger,500,1);
PutWall = Param("PutWall",VolTrigger-10,VolTrigger,500,1);
Plot(VolTrigger,"Vol Trigger",colorBlack,styleLine,VolTrigger,Null,1,Null,3);
Plot(AbsGEX,"Abs GEX",colorBlack,styleDashed,AbsGEX,Null,1,Null,4);
Plot(CallWall,"CallWall",colorCUSTOM16,styleThick|styleLine,CallWall,Null,1,Null,4);
Plot(PutWall,"PutWall",colorDarkGreen,styleThick|styleLine,PutWall,Null,1,Null,4);
}
else if (CurrentSymbol == "SPX.XO")
{
VolTrigger = Param("Vol Trigger",4200,4200,5000,1);
AbsGEX = Param("AbsGEX",VolTrigger+1,VolTrigger,5000,1);
CallWall = Param("CallWall",VolTrigger+10,VolTrigger,5000,1);
PutWall = Param("PutWall",VolTrigger-10,VolTrigger,5000,1);
Plot(VolTrigger,"Vol Trigger",colorBlack,styleLine,VolTrigger,Null,1,Null,3);
Plot(AbsGEX,"Abs GEX",colorBlack,styleDashed,AbsGEX,Null,1,Null,4);
Plot(CallWall,"CallWall",colorCUSTOM16,styleThick|styleLine,CallWall,Null,1,Null,4);
Plot(PutWall,"PutWall",colorDarkGreen,styleThick|styleLine,PutWall,Null,1,Null,4);
}
else if (CurrentSymbol == "IWM")
{
VolTrigger = Param("Vol Trigger",172,172,217,1);
AbsGEX = Param("AbsGEX",VolTrigger+1,VolTrigger,217,1);
CallWall = Param("CallWall",VolTrigger+10,VolTrigger,217,1);
PutWall = Param("PutWall",VolTrigger-10,VolTrigger,217,1);
Plot(VolTrigger,"Vol Trigger",colorBlack,styleLine,VolTrigger,Null,1,Null,3);
Plot(AbsGEX,"Abs GEX",colorBlack,styleDashed,AbsGEX,Null,1,Null,4);
Plot(CallWall,"CallWall",colorCUSTOM16,styleThick|styleLine,CallWall,Null,1,Null,4);
Plot(PutWall,"PutWall",colorDarkGreen,styleThick|styleLine,PutWall,Null,1,Null,4);
}
else
{
}