I experiment with a much simplier indicator Schaff Trend v2.02 trade, when there is signal I want to call the sell or buy script which initiate n OrderSend()
I make sure I see the trace in the log, that is the line above the call to the script, I make sure the trace contains the src line number so I can see where the src hs been reached, and the script would be called correctly or not
when I see "DEBUG Schaff is going DOWN for GBPUSD" the next line of code is the call to script
and I implement following the example in post #43 and #7 like this
from tester journal I can see the trace of the line, by src line number and DEBUG hint, before and after the call to
result = LoadMqlProgramW()
, why in debugview I still see call to LoadMqlProgramA() ?
I really dont understand
I make sure I see the trace in the log, that is the line above the call to the script, I make sure the trace contains the src line number so I can see where the src hs been reached, and the script would be called correctly or not
Inserted Code
2021.08.01 05:41:17.667 2020.04.21 04:00:00 Schaff Trend v2.02 trade GBPUSD,M15: 202 file retrieval not successful - 0 2021.08.01 05:41:17.536 2020.04.21 03:45:00 Schaff Trend v2.02 trade GBPUSD,M15: Alert: Schaff signal - 222 Schaff is going DOWN for GBPUSD from: 93.24004577 to: 81.75450645\n Current Date is: 4-21-2020\n Current System Time is: 3:45\n Current Chart Symbol is: GBPUSD\n Current Time Frame is: 15\n Current Open Bar Price is: 1.24328\n 2021.08.01 05:41:17.536 2020.04.21 03:45:00 Schaff Trend v2.02 trade GBPUSD,M15: 202 file retrieval not successful - 0 2021.08.01 05:41:17.536 2020.04.21 03:45:00 Schaff Trend v2.02 trade GBPUSD,M15: 189 file retrieval not successful - 0 2021.08.01 05:41:17.536 2020.04.21 03:45:00 Schaff Trend v2.02 trade GBPUSD,M15: Alert: Schaff signal - DEBUG Schaff is going DOWN for GBPUSD from: 93.24004577 to: 81.75450645\n Current Date is: 4-21-2020\n Current System Time is: 3:45\n Current Chart Symbol is: GBPUSD\n Current Time Frame is: 0\n Current Open Bar Price is: 1.24328\n 2021.08.01 05:41:17.388 2020.04.21 03:30:00 Schaff Trend v2.02 trade GBPUSD,M15: 202 file retrieval not successful - 0
when I see "DEBUG Schaff is going DOWN for GBPUSD" the next line of code is the call to script
and I implement following the example in post #43 and #7 like this
Inserted Code
#import "rsfMT4Expander.dll" bool LoadMqlProgramW(int hChart, int programType, string programName); #import // MQL program types #define PROGRAMTYPE_INDICATOR 1 #define PROGRAMTYPE_EXPERT 2 #define PROGRAMTYPE_SCRIPT 4 ... int start() { ... int hChart = WindowHandle(Symbol(), NULL); ... if(stcBuffer[1]>AlertUpLevel && stcBuffer[0]<AlertUpLevel) { if(NewBar()) ShowMessages("DEBUG Schaff is going DOWN for "+Symbol()+" from: " + stcBuffer[1] + " to: " + stcBuffer[0]); //Print("Last " + stcBuffer[1]); //Print("Now " + stcBuffer[0]); bool result = LoadMqlProgramW(hChart, PROGRAMTYPE_SCRIPT, "..\\Scripts\\TR@DE_SELL_Symbol_FROM_script"); //"..\\Scripts\\TR@DE_SELL_Symbol_FROM_script" if(result) Print("187 file retrieved successfully"); else Print("189 file retrieval not successful - " + string(GetLastError())); } if(stcBuffer[1]<AlertDownLevel && stcBuffer[0]>AlertDownLevel) { if(NewBar()) ShowMessages("DEBUG Schaff is going UP for "+Symbol()+" from: " + stcBuffer[1] + " to: " + stcBuffer[0]); //Print("Last " + stcBuffer[1]); //Print("Now " + stcBuffer[0]); result = LoadMqlProgramW(hChart, PROGRAMTYPE_SCRIPT,"..\\Scripts\\TR@DE_BUY_Symbol_FROM_script"); // "..\\Scripts\\TR@DE_BUY_Symbol_FROM_script" if(result) Print("200 file retrieved successfully"); else Print("202 file retrieval not successful - " + string(GetLastError())); } ...
from tester journal I can see the trace of the line, by src line number and DEBUG hint, before and after the call to
result = LoadMqlProgramW()
, why in debugview I still see call to LoadMqlProgramA() ?
I really dont understand
Attached File(s)
Schaff Trend v2.02 trade.mq4
10 KB
|
94 downloads
why_still_LoadMqlProgramA.zip
< 1 KB
|
95 downloads