Thread: How to code?
View Single Post
  #6 (permalink)  
Old 12-17-2005, 11:24 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow Reverse

Quote:
Originally Posted by jdun
What do I need to do to reverse the code from sell to buy and from buy to sell?
jdun,

The easiest way to reverse the code (sell to buy & buy to sell) is changing:

Code:
if(signal0 < signal1 ) GlobalVariableSet("TM0",1);
if(signal0 > signal1) GlobalVariableSet("TM0",0);
To:

Code:
if(signal0 > signal1 ) GlobalVariableSet("TM0",1);
if(signal0 < signal1) GlobalVariableSet("TM0",0);
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Reply With Quote