• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Tick Money Flow, CurrentBid CurrentAsk

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Tick Money Flow, CurrentBid CurrentAsk

    After searching for CurrentBid and Ask and found that it is available in NT, would anyone be interested in tackling this indicator from TS; I apologize in advance if this is the wrong place or way to ask. Thank you :
    Code:
    {
    TickMoneyFlow indicator from TS forum. D=68788&Page=2
    The CurrentAsk/CurrentBid function returns the current real-time inside Ask/Bid for the last bar on the chart,
    for use in a chart window. 
    CurrentAsk/CurrentBid cannot reference historical Ask/Bid data, and returns the Close of the bar for
    all historical bars in a chart. Keep in mind that symbols that do not trade directly will report 0;
    (e.g. Market Index Symbols). 
    }
    Inputs: Length1(500),Length2(100); 
    Vars: IntrabarPersist TickFlag(0), 
      IntrabarPersist OldPrice(0), 
      IntrabarPersist TMF(0), 
      IntrabarPersist NewTickVol(0), 
      IntrabarPersist MyBarVolume(0); 
     
    if BarNumber >= 1 then 
    begin 
     NewTickVol = Ticks - MyBarVolume; 
     MyBarVolume = MyBarVolume + NewTickVol; 
     if (C>=CurrentAsk) then begin               
      TMF=TMF + (C * NewTickVol); 
      TickFlag = 1; 
     end; 
     if (C<=CurrentBid) then begin 
      TMF=TMF - (C * NewTickVol); 
      TickFlag = 2; 
     end; 
     if (C<CurrentAsk and C>CurrentBid) and C>OldPrice then TMF=TMF + (C*NewTickVol); 
     if (C<CurrentAsk and C>CurrentBid) and C<OldPrice then TMF=TMF - (C*NewTickVol); 
     if (C<CurrentAsk and C>CurrentBid) and C=OldPrice and TickFlag = 1 then TMF=TMF + (C*NewTickVol); 
     if (C<CurrentAsk and C>CurrentBid) and C=OldPrice and TickFlag = 2 then TMF=TMF - (C*NewTickVol); 
     OldPrice = C; 
     if BarStatus(1) = 2 then MyBarVolume = 0; 
    end; 
    Plot1(TMF, "TMF"); 
    Plot2(LinearRegValue(Plot1,Length1,0)); 
    Plot3(LinearRegValue(Plot1,Length2,0));

Latest Posts

Collapse

Topics Statistics Last Post
Started by mohdhm, Today, 04:09 PM
0 responses
2 views
0 likes
Last Post mohdhm
by mohdhm
 
Started by BGWTEX, Today, 03:30 PM
1 response
3 views
0 likes
Last Post NinjaTrader_Jesse  
Started by marekflys, Today, 03:07 PM
0 responses
5 views
0 likes
Last Post marekflys  
Started by GregoryBaskin, Today, 02:51 PM
1 response
4 views
0 likes
Last Post NinjaTrader_Tyler  
Started by swcooke, Today, 12:33 PM
1 response
11 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X