Keith, thanks for responding, I already did email Dimaz several days ago, and have not heard from him. Hopefully, some other AB users have made AFL dlls that call the Plot function, and are willing to share the coding. Ron D
--------------------------- On Thu, Aug 19, 2010 at 2:15 PM, Keith McCombs <[email protected]>wrote: > > > Ron -- > I receive and save all postings via email. There were no responses to > Dimaz's 7/20/10 posting other than yours. > You might try contacting him directly, at [email protected], to see he has > made any progress. > -- Keith > > On 8/19/2010 13:14, ronald davis wrote: > > > > I just now started to learn programming. > > I tried many times to add "Plot" to the FunctionTag gFunctionTable[], > but Visual Studio always complained. > > I would appreciate receiving code with source code > that calls Plot ,so I can add it to my AFL plugin > dll>FunctionTag gFunctionTable[] > > If anyone is interested in my AFL plugin with source code, > let me know, and I will be happy to post it. > The called indicators are Stochk, StochD, RMI, PDI, ADX. > Here is how these dll called indicators appear in a formula > editor chart pane>xStochK();xStochD();xPDI();xADX();xRMI(); > > ------------------------------------------------------------------------------------ > I then added k=, d=, pi=,x=,and m= to these plugin > called xIndicators. > k=xStochK();d=xStochD();pi=xPDI();x=xADX();m=xRMI(); > km=(k+m)/2;kdm=(k+d+m)/3;kd=(k+d)/2;xpd(x+pi+d)/3; > xd=(x+d)/2;xpi=(x+pi)/2;kd=(k+d)/2;dm=(d+m)/2;kd=(k+d)/2; > > ------------------------------------------------------------------------------------ > I then commented out the built-in Amibroker indicators, > and these xIndicators caused my smoothing algorithms > to still plot the same algorithm smoothed lines. > Thanks for any help, Ron D > > ------------------------------------------------------------------------------------ > I saved Dimaz's Jul 20, 2010 at 11:08 AM post entitled>"How to use Plot > from plugin dll". > I just now went to the message board, to look for possible followup posts, > and FWIW > Dimaz's post is no longer at this July 20 messages link. > > http://finance.groups.yahoo.com/group/amibroker/messages/151240?viscount=-30&l=1 > > Dimaz asked>'What is the correct format of using Plot in plugin dll? > I try this code below, which partially works. But only array, > color,xshift and zorder seems to agree on input. The others seem to > completely ignore them. It puzzles me. > Thanks for you patience and help, > Dimaz > > AmiVar VmyPlot( int NumArgs, AmiVar *args ) { > > AmiVar close = gSite.GetVariable( "Close" ); > AmiVar colorYellow = oneValArray( 42 ); //<--- AmiVar array of number 42 > > AmiVar plotArg[8]; > plotArg[0] = close;//price > plotArg[1].string = "my plot";//name string > plotArg[2] = colorYellow;//color > plotArg[3].val = 2 ;//style > plotArg[4].val = 0;//minValue > plotArg[5].val = 0;//maxValue > plotArg[6].val = 0; //Xshift > plotArg[7].val = 0; //zorder > AmiVar result = gSite.CallFunction( "plot", 8, plotArg ); > return result; > } > FunctionTag gFunctionTable[] = { > "myPlot", { myPlot, 0, 0, 0, 0, NULL } > }; > > >
