Guest User

Untitled

a guest
Jul 27th, 2016
125
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. using System.Drawing;
  6. using PTLRuntime.NETScript;
  7.  
  8. namespace OuterClass
  9. {
  10.     /// <summary>
  11.     /// OuterClasss
  12.     ///
  13.     /// </summary>
  14.     public class OuterClass : NETStrategy
  15.     {
  16.     private NestedClass n;
  17.    
  18.         public OuterClass()
  19.             : base()
  20.         {
  21.             #region Initialization
  22.             base.Author = "";
  23.             base.Comments = "";
  24.             base.Company = "";
  25.             base.Copyrights = "";
  26.             base.DateOfCreation = "27.07.2016";
  27.             base.ExpirationDate = 0;
  28.             base.Version = "";
  29.             base.Password = "66b4a6416f59370e942d353f08a9ae36";
  30.             base.ProjectName = "OuterClasss";
  31.             #endregion
  32.  
  33.             n = new NestedClass(this);
  34.         }
  35.        
  36.         /// <summary>
  37.         /// This function will be called after creating
  38.         /// </summary>
  39.         public override void Init()
  40.         {
  41.  
  42.         }        
  43.  
  44.         /// <summary>
  45.         /// Entry point. This function is called when new quote comes
  46.         /// </summary>
  47.         public override void OnQuote()
  48.         {
  49.             mql4.Comment("Ask: ",n.getAsk());
  50.         }
  51.        
  52.         /// <summary>
  53.         /// This function will be called before removing
  54.         /// </summary>
  55.         public override void Complete()
  56.         {
  57.            
  58.         }
  59.         public class NestedClass
  60.         {
  61.             private OuterClass parent;
  62.    
  63.             public NestedClass(OuterClass p)
  64.             {
  65.                 parent = p;
  66.             }
  67.  
  68.             public double getAsk()
  69.             {
  70.                 return parent.mql4.Ask;
  71.             }
  72.         }      
  73.      }
  74. }
RAW Paste Data