[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] metastock input problem



PureBytes Links

Trading Reference Links

Hi Hemant


There's a method of combining two input values into one Input() function that works well for me. The "Cn" input in "Trade Equity GV LE" allows for the buy costs of a trade to be entered as the high-order three digits, and the sell costs to be entered as the low order three digits. That 6-digit number is then split back into its two constituents with "Cn" being just the buy costs and "Cx" being the sell costs. 

Here's the actual code taken from TE version 6.1 which with this method allows 7 values to be input via 6 Input() functions

{Taken from "Trade Equity GL LE" version 6.1}
Cn:=Input("Buy/Sell Costs",0,999999,025025);
---
---
Cx:=(Cn-1000*Int(Cn/1000));
Cn:=Int(Cn/1000);

The latest version of TE (version 6.2) allows for a multiplier to be used with "Cn" and "Cx" and an additional input is required. The multiplier is a stand-alone input but buy and sell delays ("Nd" and "Xd") are merged into one input. As the delay values have to be used as a "Periods" parameter for subsequent code they requires a little extra attention when being split into constituents.

 {Taken from "Trade Equity GL LE" version 6.2}
A:=Input("Cost Factor 0-2 (/1 /10 /100)",0,2,0);
Cn:=Input("Buy/Sell Costs",0,999999,030030);
Nd:=Input("Buy/Sell Delays",0,55,00);
---
I:=Int(11*Frac(A/10));
I:=If(I>1,100,If(I=1,10,1));
---
---
Cx:=(Cn-1000*Int(Cn/1000))/I;
Cn:=Int(Cn/1000)/I;
Xd:=LastValue(Int(Frac(Nd/9)*10));
Nd:=LastValue(Int(Nd/9));

The method used is straightforward and very effective, although there are also potential problems that need to be avoided. Single digit precision errors introduced by MetaStock pose the most obvious threat to using the technique successfully. That's why "Nd" is divided by 9 rather than 10 when extracting "Xd" and "Nd" on the last two lines of my code.

Hope this helps.


Roy



  ----- Original Message ----- 
  From: HEMANT SINGH ODESI 
  To: equismetastock@xxxxxxxxxxxxxxx 
  Sent: Wednesday, June 13, 2007 6:59 PM
  Subject: [EquisMetaStock Group] metastock input problem


  Hi every one,
  I have a problem.when I make a indicator in metastosk8(pro),
  A box appeared with this line you have exceed the maximum of 6 input
  prompts.i want to exceed 6 input to 10 input. how i can do this because
  metastock indicator builder doesnot give me permission for 10 input.
  please help me. 


  ---------------------------------
  Did you know? You can CHAT without downloading messenger. Know how!

  [Non-text portions of this message have been removed]



   

  __________ NOD32 2328 (20070613) Information __________

  This message was checked by NOD32 antivirus system.
  http://www.eset.com


[Non-text portions of this message have been removed]



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/