Script: EndWhile | Mastock Help



Short Name: EndWhile

Definition: Signal the end of a “While” construction

Usage: while....wndWhile

Objective:
  • Part of a “While” construction

Note:
  • Does not return anything

Examples:
  • Playing Around:
  • varRSI = RSI(14)
  • index = 0
  • while(index < 2)
  • if(index == 0) then
  • for(0,10)
  • valeur = var(varRSI,0)
  • accumulate(premier,valeur)
  • endfor
  • logresult(stddev(premier))
  • notifyresult
  • else
  • avg20 = avg(20)
  • avg50 = avg(50)
  • buy = crossabove(avg20,avg50)
  • sell = crossbelow(avg20,avg50)
  • notifyresult(buy,sell)
  • endif
  • increment(index,1)
  • endwhile
  • logresult(it works...)