ParamToggle for PlotForegin

Hi
I search so many websites look so many AFL,s for this from couple of days but have not find and try so many trick to work around. but unsuccessful in it. can anybody help to create Paramtoggle for PlotForeign I have code written blow:

PlotForeign(GetBaseIndex(),IndustryID(1),colorPaleBlue,styleLine|styleLeftAxisScale);

Can anybody Help me.
Thanks

Hi
For more examples use this forum search

// to use this afl (after you insert in the chart) you need to right click on chart and go to parameters.
// or keyboard shortcut  CRL+R
// Example of how to use ParamToggle() with if

Ticker1 = ParamStr("Symbol 1", Name() ); 

if( ParamToggle( "Use PlotForeign ?", "No|Yes" ) )
{
    PlotForeign( Ticker1, Ticker1, ParamColor( "Color1", colorBlue ), ParamStyle( "Style1" ) |   GetPriceStyle() );
}
else
	Plot( C, "Cloce of "+Name(), colorDefault, styleCandle );
1 Like

Panos offered a solution. Had typed this up before he already posted his AFL.

if( ParamToggle("Plot Foreign", "OFF | ON") )
{
  PlotForeign(GetBaseIndex(),IndustryID(1),colorPaleBlue,styleLine|styleLeftAxisScale);
}
1 Like

Thanks Both of you for help me out and so many other who have not ask yet.
I am hitting my head with it from couple of days.
Thanks

1 Like