Reply To: In lieu of ticket: IF() statement problem

Optuma Forums Optuma Scripting In lieu of ticket: IF() statement problem Reply To: In lieu of ticket: IF() statement problem

#51771
Colin
  • Topics: 11
  • Replies: 20
  • Posts: 31

Another test to post the real code:

PRETRADE = SWITCH( ((NDTOT[1] <= 0.0) AND (NDTOT[0] > NDTOT[1])), NDTOT[0] < NDTOT[1]); BUY = PRETRADE[0] and (PRETRADE[1] <= 0); BUY_PRICE = if(BUY[1] > 0, open(), BUY_PRICE); ND = COUNTMATCHSINCESIGNAL( 1 , BUY); PROFIT = close() - BUY_PRICE; GO = if(ND <= 1, 1.000, close()/BUY_PRICE); Gad = 1.0 + (GO - 1)/ND; Gad_max = if(Gad > Gad_max, Gad, Gad_max);

Pin It on Pinterest